Hi,
after spending some more hours to get Apple HLS working on several clients it seems that i have to patch mediaCore instead of make a device detection inside a MC-plugin.
i made a detection that is working, but handles the playlists instead of devices.
def render_markup(self, error_text=None):
"""Render the XHTML markup for this player instance.
:param error_text: Optional error text that should be included in
the final markup if appropriate for the player.
:rtype: unicode
or :class:
genshi.core.Markup
:returns: XHTML that will not be escaped by Genshi.
"""
attrs = self.html5_attrs()
tag = Element(self.media.type, **attrs)
for uri in self.uris:
...and so on...
******
Cause our plugin is able to load m3u8 on flash, android and iOS i have always the same m3u8 file-extention. Our .m3u8 is also able to handle multiple playlists and different streaming qualities.
My idea is to make a MC plugin which renders a javascript player device detection and then parse the m3u8 playlist from the "self.uri" from the MC Plugin into that javascript code.
I don't know how to include this into the MC Plugin API.
A javascript can look like this:
if ( (navigator.userAgent.indexOf('iP') != -1) || (navigator.userAgent.indexOf('Android') != -1)) {
....// iOS and android..
var videoStream = "http://myServer.com/myPlaylist.m3u8;
else {
/// here i insert flash object code...
Maybe you asked why i detect android for HLS. I need this cause if flash was installed on a android, i can't play the HLS thru the internal Anroid MpegTS player. A lot of people don't know that since android OS 2.3.3 it is possible to play mpegTS segments with an m3u8 inside the android internal player. So, basically Apple HLS is working on android devices like samsung galaxy, s3 and also on motorola tablets. You don't have to use flash here.
Can any expert help me to include the detection inside MC?
Gary