davidjamesherzog / videojs-shaka

Shaka player integration with video.js
MIT License
45 stars 18 forks source link

HLS without DRM only works in safari #53

Closed fparappa closed 2 years ago

fparappa commented 2 years ago

Have you checked for duplicate open issues here?

What version of Shaka Player and videojs-shaka are you using?

"shaka-player": "^2.4.7", "videojs-shaka": "^1.1.2"

I already tried with others shaka-player versions like 3.3.2 and 3.3.4

Can you reproduce the issue with our latest release version?

Yes

Can you reproduce the issue with the latest code from master?

Yes

Are you using the demo app or your own custom app? Own app

If custom app, can you reproduce the issue using our demo app?

What browser and OS are you using?

Mac os, Firefox and chrome last version

What are the manifest and license server URIs?

What did you do?

I configure videojs like the examples with videojs-shaka and the shaka-player library.

On firefox and Chrome I only can playback Dash, but I can't play HLS videos with this integration.

I already try with all the videos from this page: https://github.com/bengarney/list-of-streams

HLs videos only works on safari for now, I already try with DRM and its the same case.

Error:

VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) 4022 - undefined Object { code: 3, message: "4022 - undefined" } video.es.js:228:47 LogByTypeFactory video.es.js:228 error video.es.js:416 error video.es.js:25993 retriggerError videojs-shaka.js:515 Angular 25 f shaka-player.compiled.js:15 Angular 25 f shaka-player.compiled.js:15 na shaka-player.compiled.js:15 ZoneAwarePromise Angular na shaka-player.compiled.js:15 u shaka-player.compiled.js:15 u shaka-player.compiled.js:441 Hj shaka-player.compiled.js:440 qc shaka-player.compiled.js:96 $b shaka-player.compiled.js:89 c shaka-player.compiled.js:88 Angular 5 invoke onInvoke invoke run scheduleResolveOrReject

What did you expect to happen?

Play HLS (without DRM) videos on Chrome and Firefox.

On the shaka demo page I can play HLS videos on firefox and chrome:

https://shaka-player-demo.appspot.com/demo/

What actually happened?

fparappa commented 2 years ago

I am going to close this issue because it is not a bug and it is not entirely related to videojs-shaka, this issue is more related to shaka and the solution is to use mux.js, so that shaka + mux.js do the transmuxing in it browser and render HLS content correctly in browsers that do not have native support.

The ways to include mux.js can be in the index.html before loading the shaka-player library

<script src="https://github.com/videojs/mux.js/releases/latest/download/mux.js"></script>

Or if you are using components and you want to load it only when it is used, it can be as follows.

import muxjs from "mux.js";

shaka.dependencies.add("muxjs", muxjs);

Thanks