shaka-player icon indicating copy to clipboard operation
shaka-player copied to clipboard

Detach/re-attach to the video element on client-side ads for devices that don't support multiple media elements

Open ismena opened this issue 3 years ago • 4 comments

Some device types don't support multiple video elements on the page and CS IMA has to reuse the same video element to show ads. (Tizen, WebOS) For this scenario, we need to detach from the <video> and re-attach after the ads has finished playing. IMA has an isCustomPlaybackUsed method that we can call to check if the media element is gonna be reused (true if the method returns true :)).

We can call it when we get a content pause is requested by the SDK, and detach from the element if need be.

We'll need to save video.currentTime to be able to resume playback once the ads are done playing.

ismena avatar Aug 13 '20 22:08 ismena