I am developing a MVC3 application with C# and Razor. I want to create a web page where an FLV file, stored in the hard disk, is played.
I found a lot of material on how to do it in WordPress but there is no link that explains how to do it in normal 开发者_StackOverflow社区HTML.
May anybody help me or provide me resources in order to perform this task?
Thanks in advance
Francesco
You need a player to play .flv file on HTML page. You cannot play .flv files out of the box in HTML page without any flash application that can playback those files.
this is player i would advice you to use JW player
this is short example how to embed a file
div with player id is where your player will be rendered.
jwplayer.js is js file that allows you to play files and make all calls needed to .swf player below
'flashplayer': '/jwplayer/player.swf', is where player located without which you will be not able to playback the file. Attention on URL
'file': '/videos/video.mp4' is where your local .flv file is related to IIS server. Attention on URL
<div id='player'>This div will be replaced by the JW Player.</div>
<script type='text/javascript' src='/jwplayer/jwplayer.js'></script>
<script type='text/javascript'>
jwplayer('player').setup({
'flashplayer': '/jwplayer/player.swf',
'width': '400',
'height': '300',
'file': '/videos/video.mp4'
});
</script>
精彩评论