rdkcentral / Lightning

Lightning - The WPE UI Framework for developing Apps and UX
Apache License 2.0
187 stars 108 forks source link

Playing Hls content(Media Player) #214

Open krishdarling143 opened 4 years ago

krishdarling143 commented 4 years ago

Here The Media Player is not supporting to Play hls.m3u8 video urls. when we are playing that content error we are getting .It is still in implementing stage or is there any way to play this content,,, very late support from sdk team thats way i am raising issue Here

Url=https://bitmovin-a.akamaihd.net/content/playhouse-vr/m3u8s/105560.m3u8 please help me

jacek-skiba-red commented 1 year ago

Lightning framework is only responsible for apps rendering is scope of canvas HTML tag. Lightning is not responsible for Audio/Video playback (HTML5 audio / video tag).

Above HLS manifest file can be played via MSE interface (eg. with usage of hls.js or shaka library) or natively by browser:document.getElementsByTagName('video')[0].src = "https://bitmovin-a.akamaihd.net/content/playhouse-vr/m3u8s/105560.m3u8". It all depends on your browser capabilities.

URL to playback from hls.js based app (playback works for me): https://hls-js.netlify.app/demo?src=https%3A%2F%2Fbitmovin-a.akamaihd.net%2Fcontent%2Fplayhouse-vr%2Fm3u8s%2F105560.m3u8%20&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==

Streaming also can be verified with usage of ffplay (with switching in URL master manifest part to one with specific resolution):

ffplay https://bitmovin-a.akamaihd.net/content/playhouse-vr/m3u8s/105560_video_540_1500000.m3u8

Ticket should be rejected.

mauro1855 commented 1 year ago

Hi @krishdarling143, @jacek-skiba-red,

It is possible to use the Lightning SDK VideoPlayer (which was recently moved to the Metrological SDK, but is still coming as part of the Lightning SDK - documentation here) to play HLS content. You just need a custom handler.

Please see the videoplayer-hls-example GitHub project. A similar approach can be used to play other formats, like Dash - there is also a dash-drm-example here.