Opened 13 years ago

Closed 10 years ago

Last modified 10 years ago

#11092 closed Patch - Feature (fixed)

Update MythNetVision YouTube player to use iframe embed (HTML5 video)

Reported by: Alex Halovanic <halovanic@…> Owned by: Jonatan Lindblad
Priority: minor Milestone: 0.28
Component: Plugin - MythNetvision Version: Master Head
Severity: low Keywords: youtube iframe html5
Cc: Ticket locked: no

Description

Google now recommends embedding YouTube videos is via an iframe instead of loading a Flash object, as MythNetVision currently does.

This shouldn't have much of an impact to most users, but does allow YouTube to autoselect Flash or HTML5 players. Flash is preferred if installed unless you use the internal web browser to join the HTML5 opt in trial each time you start mythfrontend. There's no other ways to prefer one or the other at this point.

Attachments (3)

youtube-iframe.patch (3.2 KB ) - added by Alex Halovanic <halovanic@…> 13 years ago.
Update youtube HTML page to use iframe
youtube-iframe-0.2.patch (4.0 KB ) - added by Achim Hofmann <info@…> 13 years ago.
removed obsolete functions and set the default playback quality to 'hd720'
youtube.html (3.2 KB ) - added by Achim Hofmann <info@…> 13 years ago.
See comment from 28. May 2013

Download all attachments as: .zip

Change History (12)

by Alex Halovanic <halovanic@…>, 13 years ago

Attachment: youtube-iframe.patch added

Update youtube HTML page to use iframe

comment:1 by Alex Halovanic <halovanic@…>, 13 years ago

For what it's worth, libwebkit 4.8 does seem to work reasonably well with HTML5 videos for me here, given enough gstreamer dependencies installed: I don't have any audio yet, and a mild amount of tearing and the occasional crash, but that's not very far off from the Flash player.

in reply to:  1 comment:2 by Achim Hofmann <info@…>, 13 years ago

Alex: Do you know what gstreamer plugins are essentially needed to enable mythbrowser to play videos on youtube using html5? I have your patch installed but unfortunately I always get a "this video is currently not available" message on youtube, while playing them on my notebook with KDE desktop and Firefox works fine using html5. Even the testvideo refered within the API documentation won't play on my Gentoo based myth machine. Which verbosity level/settings for mythfrontend would you recommend to get these information?

This is what I currently have installed:

mythtv@mediacenterpc ~ $ equery l -i qtwebkit */gst*
 * Searching for qtwebkit ...
[IP-] [  ] dev-qt/qtwebkit-4.8.4:4

 * Searching for gst* in * ...
[IP-] [  ] media-libs/gst-plugins-bad-0.10.23-r1:0.10
[IP-] [  ] media-libs/gst-plugins-base-0.10.36:0.10
[IP-] [  ] media-libs/gstreamer-0.10.36:0.10
[IP-] [  ] media-plugins/gst-plugins-ffmpeg-0.10.13-r2:0.10
[IP-] [  ] media-plugins/gst-plugins-vp8-0.10.23-r1:0.10

Thanks a lot!

comment:3 by Achim Hofmann <info@…>, 13 years ago

Got it working! I now have the following plugins installed, where the ffmpeg plugin can be omitted I think.

mythtv@mediacenterpc ~ $ equery l -i qtwebkit */gst*
 * Searching for qtwebkit ...
[IP-] [  ] dev-qt/qtwebkit-4.8.4:4

 * Searching for gst* in * ...
[IP-] [  ] media-libs/gst-plugins-bad-0.10.23-r1:0.10
[IP-] [  ] media-libs/gst-plugins-base-0.10.36:0.10
[IP-] [  ] media-libs/gst-plugins-good-0.10.31:0.10
[IP-] [  ] media-libs/gstreamer-0.10.36:0.10
[IP-] [  ] media-plugins/gst-plugins-alsa-0.10.36:0.10
[IP-] [  ] media-plugins/gst-plugins-ffmpeg-0.10.13-r2:0.10
[IP-] [  ] media-plugins/gst-plugins-vorbis-0.10.36:0.10
[IP-] [  ] media-plugins/gst-plugins-vp8-0.10.23-r1:0.10

comment:4 by Achim Hofmann <info@…>, 13 years ago

Advice: If the playback is choppy you can reduce the quality level using function player.setPlaybackQuality(suggestedQuality:String):Void of the Google Player API.

https://developers.google.com/youtube/iframe_api_reference#Playback_quality

Please find attached an updated version of Alex' youtube html page (youtube-iframe-0.2.patch) where I set the default playback quality level to 'hd720'. Available values are 'small', 'medium', 'large', 'hd720', 'hd1080' and 'highres'.

by Achim Hofmann <info@…>, 13 years ago

Attachment: youtube-iframe-0.2.patch added

removed obsolete functions and set the default playback quality to 'hd720'

comment:5 by Alex Halovanic <halovanic@…>, 13 years ago

Hi Achim,

Glad you were able to get this working. But I believe those functions you removed were used by the remote control.

-Alex

comment:6 by Achim Hofmann <info@…>, 13 years ago

Hi Alex,

of course, you are right. So please find attached the corrected version with all functions included. One other improvement of this new version is that it disables this annoying annotations (text-box overlays). This is done by setting player parameter iv_load_policy to 3.

https://developers.google.com/youtube/player_parameters#iv_load_policy

by Achim Hofmann <info@…>, 13 years ago

Attachment: youtube.html added

See comment from 28. May 2013

comment:7 by Jonatan Lindblad, 10 years ago

Owner: set to Jonatan Lindblad
Status: newassigned

comment:8 by Jonatan Lindblad <jlindblad@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In 36717b5a597602bb6da088b2e5954924d0d52b2b/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:9 by Jonatan Lindblad, 10 years ago

Milestone: unknown0.28
Note: See TracTickets for help on using tickets.