我想使用jw播放器在我的网页上播放flv文件,任何人都可以建议我如何嵌入和设置网址路径。
我已下载jw播放器文件,例如player.swf,swfobject.js& jwplayer.js 我的代码在这里:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="VideoPlayer.aspx.cs" Inherits="VideoPlayer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceBody" Runat="Server">
<table class="style14">
<tr>
<td>
<script type='text/javascript' src='/jwplayer/jwplayer.js'></script>
<div id='mediaspace'>This text will be replaced</div>
<script type='text/javascript'>
jwplayer('mediaspace').setup({
'flashplayer': '/jwplayer/player.swf',
'file': 'Baby.FLV',
'controlbar': 'bottom',
'width': '470',
'height': '320'
});
</script>
</td>
</asp:Content>
答案 0 :(得分:1)
尝试这样的事情
<div id="container">Loading the player ...</div>
<script type="text/javascript">
jwplayer("container").setup({
flashplayer: "/jwplayer/player.swf",
file: "/uploads/Baby.FLV", //change to where ever the path is for your example
height: 470,
width: 320
});
</script>