Open emclaren opened 4 years ago
Relevant lines in the log above:
[Error] Failed to load resource: the server responded with a status of 403 (Forbidden) (videoplayback, line 0)
[Error] Error adding media – Error: Unsupported content type: text/plain
Error: Unsupported content type: text/plain
Might be useful to know whether this only happens to youtube videos, or if you can reproduce with an uploaded video. You can download this video to test: https://github.com/bower-media-samples/big-buck-bunny-1080p-30s/blob/master/video.mp4?raw=true
Vimeo videos work.
When I try to drag and drop that file into a hubs room in safari I get the following response
[Error] Failed to load resource: cannot parse response (media, line 0)
[Error] Media upload failed – TypeError: cannot parse response
TypeError: cannot parse response
(anonymous function) (vendor-d5db294e2e3226d9832f.js:512:125981)
(anonymous function) (hub-b8fe197e6a2173d0bad4.js:1:54264)
promiseReactionJob
[Error] Error adding media – TypeError: Type error — media-loader.js:365
TypeError: Type error — media-loader.js:365
(anonymous function) (vendor-d5db294e2e3226d9832f.js:512:125981)
(anonymous function) (hub-b8fe197e6a2173d0bad4.js:1:301949)
generatorResume
C (hub-b8fe197e6a2173d0bad4.js:1:290121)
r (hub-b8fe197e6a2173d0bad4.js:1:290324)
(anonymous function) (hub-b8fe197e6a2173d0bad4.js:1:290383)
Promise
(anonymous function) (hub-b8fe197e6a2173d0bad4.js:1:290275)
callUpdateHandler (engine-6c53dee8732f2549b121.js:1:69545)
updateProperties (engine-6c53dee8732f2549b121.js:1:67938)
updateComponent (engine-6c53dee8732f2549b121.js:1:85953)
setAttribute (engine-6c53dee8732f2549b121.js:1:88007)
(anonymous function) (hub-b8fe197e6a2173d0bad4.js:1:54304)
promiseReactionJob
Haven't investigated, but we have a safari specific code path in reticulum for media resolution for videos iirc, which may explain the difference.
A community member attended the office hours today to ask about this issue
Is this still happening?
@InfiniteLee can you confirm this is still a bug.
I hit this on my iPhone 11 this morning - should we have separate issues for Safari mobile and on Mac OS?
Also confirmed this is still happening on Safari on mac.
After a bunch of investigation, this appears to actually be two different issues:
This is a response from a working vimeo video:
and this is a response from a non-working youtube video:
According to that article, we may need to disable caching for mp4's that are proxied by cloudfront, which in theory can be done by adding the header cf: { cacheTtl: -1 }
to the request (cloudflare's documentation), however I'm not sure how to do this nor if this is even a good idea.
If you take out youtube-dl as a factor (and run it locally to get the raw url), it appears that youtube videos are only not loading on hubs servers that are using reticulum for cors-proxying (assuming that hubs.mozilla.com and dev.reticulum.io are both using cloudflare). So one potential workaround for hubs cloud users is to use a cloudflare worker.
Any additional reports of this issue should specify if this is happening on hubs.mozilla.com or a hubs cloud server to verify if this is actually the case.
example raw video url (this url may stop working)
hubs.mozilla.com: https://hubs-proxy.com/
dev.reticulum.com: https://cors-proxy-dev.reticulum.io/
hubsloadtesting.com (cloud instance using cloudflare worker): https://hubs-hubsloadtesting-com-cors-proxy.hubsloadtesting.workers.dev/
hups.motziller.com (cloud instance not using cloudflare worker): https://cors-proxy.hups.motziller.com/
local reticulum: https://hubs-proxy.local:4000/
Why do you think the cloudflare worker fixes the issue? Does Youtube recognize it's a CDN and serve up the video differently?
While not related, #2583 isn't fixed. According to this bug, Google is blocking the streams originating from the hubs? Not clear on why that bug was closed as it is not a duplicate of an existing bug. About a week and half ago, I had youtube beatport live streams working in a video object (via Hubs), and then suddenly later on in the day I made some modifications to the scene, and it stopped loading any videos.
I will try out the problem as described in this issue on Safari / OS X and also Firefox OS X, to see if I can reproduce on youtube videos.
Hi @truedat101 - Hubs' servers are blocked when there are too many requests to youtube during a period of time. When it is blocked it is generally just for a few hours, after which point it will start working again.
Since our servers have become much busier, we've been seeing this occur more frequently. We've since begun advising against relying on youtube for mission critical content, we recommend hosting videos on the Hubs servers by uploading to your Hubs room or Spoke (there is a 128MB size limit for these videos) or on a self-hosting videos on a provider like Amazon S3.
When this occurs you should see an error message that says "Unable to load video" not the broken link image (as pictured above). Are you getting a broken link pictures?
@emclaren yeah it seemed very sudden, as it worked for a few hours and then magically broken. On the scene when loading a video link I was seeing the swirling box as if it is trying to load a video. I was not getting broken links in every case, although from the spokes side when I would reload a scene, then I get the javascript looking error pop up.
An email we received from a community member mentioned that there are issues with video playback on different versions of the safari browser on iPads
"after some research and testing it seems that Videos/360 Video and audio, work for any IOS device with a safari browser that is Version 13.0.0 or lower. We have tested on several iPads and they do not output video or audio on Version 14.0.0. We tested using another IPAD running at Version 12 and both video and audio playback works perfectly. "
Hi, I can confirm that this is still an issue on all browsers on iOS , safari and chrome. Just a music note shows up!! Any hot fixes for this ...
I can confirm the issue still persists on all browser (Safari, Chrome, Firefox) on iOS 14.4 . (Apparently Safari core is to be blamed)
Is the issue going to be attended to? It is critical in deploying hubs at my organisation, so any update is welcome (so that I can plan the deployment).
I could not reproduce this in a quick test on iOS 14.4. Can you confirm that it breaks if you paste this video link into a room? https://brianpeiris.github.io/test-media/big-buck-bunny-360p-short.mp4
@brianpeiris your video works just fine, looks like the importend part is the hosted server needs allow 206 https request https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206
I could not reproduce this in a quick test on iOS 14.4. Can you confirm that it breaks if you paste this video link into a room? https://brianpeiris.github.io/test-media/big-buck-bunny-360p-short.mp4
@brianpeiris , I tested the video link in the room. Apart from a low framerate (about 1=2 fps), the video DID play on 2 iPad Air 2 iOS 14.4 devices.
I managed to reproduce the issue using a vimeo video, but only on one of two devices (both were iPad Air 2). I will provide logs as soon as our IT enables remote logging and post them here.
- safari does not support certain video formats such as .mkv or .webm - we probably should show a proper error message in the case that either of these media formats is detected
This issue likely does NOT have anything to do with unsupported video format in Safari, mentioned above.
Thank you for your attention to the issue. I hope I will be able to provide you with sufficient info next week!
https://github.com/mozilla/hubs/issues/2345#issuecomment-666030185
After a bunch of investigation, this appears to actually be two different issues:
- safari does not support certain video formats such as .mkv or .webm - we probably should show a proper error message in the case that either of these media formats is detected
- Certain videos (that otherwise work if uploaded) when proxied via cloudflare, do not return the correct response code which causes safari to be unable to play the videos. I believe this article documents the issue we are experiencing:
Regarding 2, Sounds like it has been resolved by #4630.
Regarding 1, what video encodings does Safari not supported yet? In any case, I speculate Safari supports popular video formats so that we can prioritize the issue lower.
Description When videos are brought into a room in Safari they appear just as a broken link
To Reproduce Steps to reproduce the behavior:
Expected behavior video plays
Screenshots
Hardware Macbook pro Safari 13.1
Additional context Console log
┆Issue is synchronized with this Jira Task