videojs / http-streaming

HLS, DASH, and future HTTP streaming protocols library for video.js
https://videojs-http-streaming.netlify.app/
Other
2.53k stars 425 forks source link

How can I create new instance of videojs player or re initialize it without disposing the player. #1368

Open lalit-tudip opened 1 year ago

lalit-tudip commented 1 year ago

Please do not delete the template, by filling out the required information we can investigate your issue more quickly.

Before opening an issue see if your problem can be resolved with the troubleshooting guide.

Description

I'm currently working on a streaming app and streams with DRM's Fairplay and Widevine are working fine on chrome and safari. The problem arises when the stream is encrypted with aes-128. The stream is working on chrome but failing on safari as safari doesn't have a VHS handler by default. I can get the VHS handler by giving overrideNative: true to the player but that breaks non-aes-128 stream. We can only provide the option to players at the time of initialization. So is there any workaround where I can re-initialize the player whenever I encounter aes-128 stream? I tried disposing of the player but that caused other problems like crashes and other issues. I have already through this (https://github.com/videojs/video.js/issues/4865)

Sources

NA

Steps to reproduce

I cannot provide the example as the code is private and protected as per client but I can answer the question if there is any doubt.

Results

Expected

NA

Error output

NA

Additional Information

Please include any additional information necessary here. Including the following:

videojs-http-streaming version

what version of videojs-http-streaming does this occur with? videojs-http-streaming "^2.8.0"

videojs version

what version of videojs does this occur with? video.js "^7.20.1"

Browsers

what browsers are affected? please include browser and version for each

Platforms

what platforms are affected? please include operating system and version or device and version for each

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below. *"videojs-contrib-dash": "5.1.0", "videojs-contrib-eme": "3.9.0",

welcome[bot] commented 1 year ago

šŸ‘‹ Thanks for opening your first issue here! šŸ‘‹

If you're reporting a šŸž bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.

misteroneill commented 1 year ago

Safari is the reference player and definitely should support AES-128 encrypted streams. If your stream is not playing in native Safari, then there's likely an issue with the stream that needs to be addressed.

If you could provide a reduced test case, someone may be able to provide more insight.