Video plugin: External video source gives errors

Bugs will be moved here once resolved.

Post » Thu Nov 17, 2016 8:17 pm

Problem Description
External URLs to .mp4-files either don't play or give javascript errors.

Attach a Capx

Description of Capx
Click "Load" to set H.264 source in the Video plugin to the external .mp4-file. Click "Play" to play video.

Steps to Reproduce Bug
  • Click "Load"
  • Click "Play"
Observed Result
- In IE11: Only the sound plays.
- In Chrome: Nothing happens. The console logs this error: "video_plugin.js:113 Uncaught (in promise) DOMException: The element has no supported sources."
- In Edge: Nothing happens

- In Chrome: Video plays as expected. But afterwards it throws this error:
- In Safari: Video plays as expected.

Expected Result
The video should just play. The file sits on my own server with CORS headers

Affected Browsers
  • Chrome - desktop: (YES)
  • Chrome - mobile: (YES)
  • Internet Explorer: (YES)
  • Microsoft Edge: (YES)
  • Safari - mobile: (NO)
Operating System and Service Pack
Desktop: Microsoft Windows 10 Home
Mobile: iOS 10.1.1

Construct 2 Version ID
Posts: 48
Reputation: 860

Post » Tue Dec 20, 2016 5:44 pm

The server's response headers don't include Access-Control-Allow-Origin (despite what you say), so this is probably just a CORS issue. You also need at least one other codec to guarantee all browsers can play it. The JS error in your screenshot references a function which is definitely not part of C2, so I'd check your browser addons, they may be interfering. Closing as won't fix.
Scirra Founder
Posts: 25,279
Reputation: 200,817

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests