rico345100 / react-multimedia-capture

react-multimedia-capture is Multimedia capturing module via React, using HTML5 MediaDevice and MediaRecorder API
49 stars 14 forks source link

Video is not playing in firefox web browser which is recorded by the chrome web browser in react #3

Closed dayakarsreddy closed 6 years ago

dayakarsreddy commented 6 years ago

Video is not playing in firefox web browser which is recorded by the chrome web browser

  1. We had recorded video in chrome browser and uploaded to server. Video is playing in chrome browser but not playing in firefox browser.
  2. We had recorded video in firefox web browser and uploaded to server. Video is playing in firefox and chrome web browsers.
  3. So we have a issue with playing videos in firefox which are recorded by the chrome browser.

Please let me know how can we fix it.

rico345100 commented 6 years ago

Hello, did you try to play video manually in each browser by dragging to it? Was it worked?

react-multimedia-capture uses "video/webm;codecs=vp8" for video recording by default, and as I searched, latest builds of Chrome and FF support webm and VP8 both, so that couldn't be happened.

I want to test your case into my computer, but unfortunately I can't use video recorder now for some reason, so it could be little bit late to test, but I will notice you as possible as I can(AudioExample was worked).

I'm not sure why that happens, but seems like each browser has something different on recording media resources. Is there any warning or error message in console? What about trying other MIME type instead and see it's work?

https://stackoverflow.com/questions/41739837/all-mime-types-supported-by-mediarecorder-in-firefox-and-chrome

dayakarsreddy commented 6 years ago

screen shot 2018-02-15 at 3 27 52 pm I got the above error when playing video after recorded in firefox

dayakarsreddy commented 6 years ago

screen shot 2018-02-15 at 3 46 44 pm screen shot 2018-02-15 at 3 45 59 pm

dayakarsreddy commented 6 years ago

I have tried using different mime types but there is no luck.

rico345100 commented 6 years ago

Hello, I just recorded video from Chrome and played to Firefox and it worked. I tested with react-multimedia-capture-example.

I don't know why that issue only happens to you. Anyway I keep try to find out how to solve your problem, but I think this isn't issue about react-multimedia-capture.

I think you should try recording video with HTML5 Media Device API and MediaRecorder API directly to see it's still not working. If it does, I couldn't help you.

MarkBennett commented 6 years ago

Hey! I know what's up! When I'm using Firefox I'm seeing errors about event not being defined in index.js.

screen shot 2018-02-23 at 14 32 55

These don't appear in Chrome. I looked into and this is because Chrome supports Window.event. This is a non-standard API from Internet Explorer days (surprise!) The actual name of the event argument in the callback handler used in this code is ev.

https://github.com/rico345100/react-multimedia-capture/blob/master/src/index.js#L118-L122

I've been able to verify that changing that lets me record in Firefox. I'm submitting a PR now!