Reputation: 232
I have the following link:
http://cdnv2.ec.cx/RedeCanais/RedeCanais/RCServer01/videos/STHPRKT02EP01.mp4
I'm trying to embed it in an application that i'm writing in React.
I have tried using HTML5 video tag and video-react, but instead of playing the file it downloads right away... I made a test in C# (winforms) with Windows Media Player Component and it plays normally.
Here some source I've tried:
<video controls>
<source src="http://cdnv2.ec.cx/RedeCanais/RedeCanais/RCServer01/videos/STHPRKT02EP01.mp4" type="video/mp4">
</video>
<video src="http://cdnv2.ec.cx/RedeCanais/RedeCanais/RCServer01/videos/STHPRKT02EP01.mp4" controls>
import React from 'react';
import { Player } from 'video-react';
export default (props) => {
return (
<Player
playsInline
src="http://cdnv2.ec.cx/RedeCanais/RedeCanais/RCServer01/videos/STHPRKT02EP01.mp4"
/>
);
};
Is there a way to play this link on the browser with only js or some client-side script?
Upvotes: 1
Views: 4001
Reputation: 8236
curl -I http://cdnv2.ec.cx/RedeCanais/RedeCanais/RCServer01/videos/STHPRKT02EP01.mp4
shows that your server has a MIME type of video/x-flv
for your video. You want it to be video/mp4
in IIS you can adjust that either with a web.config file, or:
Upvotes: 1