millicast / millicast-sdk

SDK for building a realtime broadcaster using the Millicast platform.
Other
39 stars 30 forks source link

Black Screen Instead of Video #470

Closed kdietrich22 closed 3 weeks ago

kdietrich22 commented 3 weeks ago

I am not a developer so apologies in advance if I am not providing all pertinent info.

Version affected I believe we're using the current version as we're calling this URL which leads me to believe we're getting whatever the pastest version is? https://cdn.jsdelivr.net/npm/@millicast/sdk@latest/dist/millicast.umd.js

Describe the bug There is no video visible at all on any browser, just a black screen. The streaming has been working for at least a year now and just today at 1pm when the stream started it wasn't working. No other changes have been made to our site.

To Reproduce Steps to reproduce the behavior:

  1. Go to clubhousebreaks.com
  2. Click on Watch Breaks in the nav
  3. Note you can see the stream is Live but the screen is black - no video is playing

Expected behavior When a user has clicked to start their broadcast in streaming.dolby.io the stream will be viewable on the website.

Environment (please complete the following information):

FabienLavocat commented 3 weeks ago

@kdietrich22 thank you for reporting this. The problem is that in the version 0.3.0 we deprecated the video element property when creating the View object. You have two options here:

  1. Update your code When you create the View object, do not pass the video element, instead listen to the track event and set the track to the video element manually.
const viewer = new millicast.View(streamName, tokenGenerator);
viewer.on('track', (event) => {
   document.getElementById('video').srcObject = event.streams[0];
});
  1. Revert back to the previous version of the SDK and later update your code.
kdietrich22 commented 3 weeks ago

Thank you! To revert back to the previous version do we hardcode the SDK version and where? What is the previous version we should use?

FabienLavocat commented 3 weeks ago

Temporarily, you can use this URL:

https://cdn.jsdelivr.net/npm/@millicast/sdk@0.2/dist/millicast.umd.min.js
kdietrich22 commented 3 weeks ago

Great - thanks! What is the .min at the end of the URL indicating? We don't have that in our current URL. We have only .umd.js

FabienLavocat commented 3 weeks ago

The .min indicates it's a minified version of the file (smaller in size). Not a big deal if you don't have it currently as the file is already minified.

FabienLavocat commented 3 weeks ago

@kdietrich22 I see that you still have the warning in your code, have you been able to update your web app to fix the video issue?

kdietrich22 commented 3 weeks ago

Yes, we just pushed it live. Thank you for your help! We go live in 45 minutes so we'll see for sure then but testing on dev went well.

On Tue, Oct 29, 2024 at 12:03 PM Fabien Lavocat @.***> wrote:

@kdietrich22 https://github.com/kdietrich22 I see that you still have the warning in your code, have you been able to update your web app to fix the video issue?

— Reply to this email directly, view it on GitHub https://github.com/millicast/millicast-sdk/issues/470#issuecomment-2444861148, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFNOB6CROKHMOSI3FELE4Z3Z565VLAVCNFSM6AAAAABQYP373SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBUHA3DCMJUHA . You are receiving this because you were mentioned.Message ID: @.***>

-- Katie Dietrich Project Manager

BuildLabs 123 N 3rd St, Ste 101 Cell:612-598-6695

FabienLavocat commented 3 weeks ago

Perfect, I see that you've downgraded the SDK. Reopen this issue if it comes back.

FabienLavocat commented 3 weeks ago

@kdietrich22 FYI, we just release the version 0.3.2 of the SDK where we reverted the change that removed the mediaElement variable. You should now be able to use this URL for your code and you will get the latest version.

https://cdn.jsdelivr.net/npm/@millicast/sdk@0.3/dist/millicast.umd.js
kdietrich22 commented 2 weeks ago

Hi Fabien,

Understood. For a long term fix though should we remove the mediaElement variable from our code so that when you do deprecate it we don't have any issues?

Thanks, Katie

On Wed, Oct 30, 2024 at 4:50 PM Fabien Lavocat @.***> wrote:

@kdietrich22 https://github.com/kdietrich22 FYI, we just release the version 0.3.2 https://github.com/millicast/millicast-sdk/releases/tag/v0.3.2 of the SDK where we reverted the change that removed the mediaElement variable. You should now be able to use this URL for your code and you will get the latest version.

@.**@./dist/millicast.umd.js

— Reply to this email directly, view it on GitHub https://github.com/millicast/millicast-sdk/issues/470#issuecomment-2448483080, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFNOB6F34IIIDCC3FEDNVJ3Z6FID7AVCNFSM6AAAAABQYP373SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBYGQ4DGMBYGA . You are receiving this because you were mentioned.Message ID: @.***>

-- Katie Dietrich Project Manager

BuildLabs 123 N 3rd St, Ste 101 Cell:612-598-6695

FabienLavocat commented 2 weeks ago

Yes, remove the variable from your code (use the track event) and you will be ok with the next release of the SDK.