Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

Fix Video Loop Issues #136

Merged
merged 3 commits into from
May 5, 2017
Merged

Fix Video Loop Issues #136

merged 3 commits into from
May 5, 2017

Conversation

timmyc
Copy link
Contributor

@timmyc timmyc commented May 5, 2017

This is still in progress as I still have yet to find a solution for the YouTube looping. This branch seeks to fix #130 - though. While testing out the original report, I noticed that the loop issue was only happening on YouTube embeds, and not on Vimeo embeds. But even when loop was true for Vimeo embeds - they were not looping in the rendered widget.

A fix for the vimeo issue can be seen in dddaa88 ( which apparently has made CI unhappy ). By adding the loop query arg on the Vimeo url, the underlying iframe from Vimeo loops when expected to. YouTube also supports this query arg ( https://developers.google.com/youtube/player_parameters ), but it appears that mediaelement is mangling with the YouTube embed url... because even when the logic in this branch adds the loop query arg appropriately, the iframe src that is subsequently rendered in the widget no longer has the argument:

customize__blog_ _wordpress_develop

If I manually add the loop query arg back into the iframe URL seen above, the YouTube video no longer loops.

@timmyc
Copy link
Contributor Author

timmyc commented May 5, 2017

Related: mediaelement/mediaelement#1851

and fixed in instructure/mediaelement#17

And released in version 2.23.2 per https://github.com/instructure/mediaelement/blob/master/changelog.md

Version of mejs in trunk is 2.22.0

@obenland
Copy link
Contributor

obenland commented May 5, 2017

Maybe we should update the library in 4.8?

@timmyc
Copy link
Contributor Author

timmyc commented May 5, 2017

I think it was talked about in the bug scrub today: https://core.trac.wordpress.org/ticket/39686

The issue is to upgrade to a new major version release, so not sure if we can push to do a minor bump to 2.x or not... fwiw any use of wp_video_shortcode with a YouTube video is also affected by this. I need to circle back and see if we can mimic the editor embed flow instead since it isn't looping.

@timmyc timmyc mentioned this pull request May 5, 2017
@obenland
Copy link
Contributor

obenland commented May 5, 2017

With mediaelement updated, would we still need this proposed change?

@westonruter westonruter merged commit 95cb9a5 into master May 5, 2017
@westonruter westonruter deleted the fix-video-loop branch May 5, 2017 22:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

video looping
3 participants