Looping media playback

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Looping media playback

Postby callum » Thu Nov 04, 2021 6:50 pm

Our application supports playback of MPEG4 media URLs using a build of CEF with the relevant flags enabled and it works well.

However, we would like to support looped playback but we don't have the option to ask the user to right-click and select "Loop" like you might in the same situation in Chrome.

I wondered if there is a URL parameter you can add to the naked MPEG4 URL to force loop but the obvious things did not work.

I experimented a bit with Chrome Inspector to insert a "LOOP" attribute in the HTML fragment that gets generated for video playback and it worked but I am not sure how to translate that into code?

Finally, I tried building a data URI with my own fragment of HTML containing the appropriate HTML attributes and the URL of the video. That didn't quite work either. (Looped but didn't autoplay even with the autoplay attribute present).

EDIT: Chrome makes you mute video if you want to loop it. Fragment of HTML with loop and MUTE attributes worked. Still don't know how to seamlessly wrap the bare video URL in the stanza of HTML code.

Is there an easy way to do this?
callum
Expert
 
Posts: 323
Joined: Mon Feb 23, 2015 6:19 pm

Return to Support Forum

Who is online

Users browsing this forum: cybersight and 35 guests