-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add thumbnails to the UI #3371
Comments
Nothing so far! If not - we'll be happy to accept a PR, as this isn't on the roadmap for the foreseeable future (the next 6 months or so). |
Thumbnail track support without the UI (issue #559, PR #3145) landed recently. We don't have it incorporated into our UI yet. If you're building your own UI, the API is: Then you have the image URLs and metadata to position the image where you want in the UI. I'll convert this question into an enhancement request to add this to our UI. In the meantime, please let us know what you think of the API, and whether you are interested to extend our UI and send a PR. Thanks! |
Hello @joeyparrish can you please give me a hint about it so that I can try it in my project and then when I am successful. I can do a PR :) Thank you :) |
You can build Shaka Player from source for now instead of using NPM releases, or you can wait for the v3.1.0 release, which we intend to ship today or tomorrow. |
woohoo! |
Thanks for adding this for custom UI's! :) How does this work? Is it like loading a |
Hello @joeyparrish, After loading the player. I did player.getImageTracks() but I got an empty image tracks. |
Thank you @avelad for the example :) |
@hiren3897 You can find more examples in: https://nightly-dot-shaka-player-demo.appspot.com/demo/#panel=ALL_CONTENT;panelData=THUMBNAILS;build=uncompiled |
Thanks for this 👍 Can you please tell me how you made thumbnails appeared on shaka-player with a sample code? |
The code is in my application, but I can share some guidelines ... As there can be multiple image tracks, you must select one, an example would be:
Then you have to do the logic to get the image given a certain point, which would be something like this:
I don't think it's the best or the only implementation possible, but it's one I've been working on. |
Thanks, @avelad I will take it as a reference and do implement it in my project 💯 |
The thumbnail is supported only for the videos that have manifest and not with the VOD links? |
Right now it is only supported on HLS and DASH. I have seen that there are some players that support a special WebVTT track with thumbnails, if you want support for this, please open a new enhancement type issue. More info in: |
Hey @hiren3897 @avelad how are you? I was able to render correctly the thumbnails in a certain position but this according to the manifest returns me a Sprite type image, so I can't position them in the second indicated. Have you found a way to crop the image and position it at the required second? |
Hello @gonzajet, You can use CSS properties to achieve this problem, like background Image, X and Y position, and scale the particular Image to display it on a seek bar "mouseon" This code is in my application that could help you to have some idea const scale = width / thumbnail.width;
this.thumbnailImage_.style.backgroundImage = 'url(' + url + ')';
this.thumbnailImage_.style.backgroundPositionX = thumbnail.positionX + 'px';
this.thumbnailImage_.style.backgroundPositionY = thumbnail.positionY + 'px';
this.thumbnailImage_.style.transform = 'scale(' + scale + ')';
this.thumbnailImage_.style.height = thumbnail.height + 'px';
this.thumbnailImage_.style.width = thumbnail.width + 'px'; Good luck :) |
Hello @hiren3897 , Thank you very much for your quick response! |
Hi all,
did not work. |
When are you running that code, in the load process? I tried it out myself and it seems to work fine for me. The only reason I could think that it might not work would be if you call it and then the controls are remade afterwards, or something like that. If you set up the event listener inside the constructor of this.eventManager.listen(this.bar, 'mouseover', () => {
console.log('mouseover');
});
this.eventManager.listen(this.bar, 'mouseout', () => {
console.log('mouseout');
}); |
I am using Native Player(src=) in safari |
With src= there is no way to use thumbnails in Safari. |
Then can you please tell me how I can use MSE on safari? to play HLS live and VOD? |
You can set |
Thanks, it worked and thumbnails appeared. can you please quickly explain to me the difference between native safari (src=) and MSE? Specially which one is the best to use MSE or Native? Does it also reflect other information required like seekRange() and getChaptersTracks? |
HLS on MSE still has some limiting features, but it is fully functional. Are you using FairPlay? Chapters work in both modes. |
For HLS Live with DRM protected I am using FairPlay. Else for other HLS live without DRM protection we use a normal HLS playlist Will it be better if I use MSE? Will I be able to get the seekRange and other suffs? Because It is difficult to mark the chapter or get the thumbnails for live HLS because of a lack of |
after setting streaming.useNativeHlsOnSafari to false on iPhone safari it still use Native (src=). On iPad we have MSE but when I mousemove the seek-bar the thumbnail doesn't appear!! when I click or seek-bar sometimes the thumbnails appear! do you know the reason why? touchmove event? touchcancel event? |
Yes, iOS does not support MSE yet (see https://bugs.webkit.org/show_bug.cgi?id=225564 ), on iPadOS MSE is supported as long as the web is not added to the home screen. |
I am facing a problem while scrubbing on the On the web browser level, everything works like a charm While testing it on iPad OS safari. I did much research on mousemove event and yes it does support on safari browser but why it is not working on iPadOS safari and chrome is a nightmare. Do we have anything in the shaka-player UI that is affecting the mousemove event on iPad Safari and Chrome? ON CHROME @avelad can you please share with me your email so you can test it. |
Hello, @avelad we have a DASH live with a DVR of 3 hours with thumbnails. the player is able to return only the thumbnails for lesser than 30 mins approx for example, the live seek is from 40 to 200 then it gets the thumbnail between 150 to 200, after < 150 it gives 151 thumbnails only even if I hover at the start of the timeline. here is the test URL for you: https://test-drm.hexaglobe.net/hrathod/new-plugin/dash-live-thumbs.php If you need the manifest I can send you personally, |
I guess maybe the player is not able to get the correct reference position. Line 3606 in 5818260
|
@avelad can we also see this bug on thumbnails with 3 hours of DVR? |
@hiren3897 please, open a new issue for it. Thank you! |
I created a PR for it #5502 |
Closes #3371 Stored content thumbnails are not supported.
New funcionality deployed in the nightly demo: https://nightly-dot-shaka-player-demo.appspot.com/demo/#audiolang=es-ES;textlang=es-ES;uilang=es-ES;panel=ALL_CONTENT;panelData=THUMBNAILS;build=uncompiled |
Closes shaka-project#3371 Stored content thumbnails are not supported.
Have you read the Tutorials?
YES
Have you read the FAQ and checked for duplicate open issues?
YES
What version of Shaka Player are you using?
3.0.10
Please ask your question
but I don't have a clear roadmap on how to do it?
Can you please elaborate here in detail about it if there are any possibilities for this feature?
Thank You in advance :)
The text was updated successfully, but these errors were encountered: