如何在asp c#页面中嵌入jw flash播放器

本文关键字:jw flash 播放器 asp | 更新日期: 2023-09-27 18:18:20

我想用jw播放器在我的网页上播放flv文件,谁能建议我如何嵌入和设置url的路径?

我已经下载了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>

如何在asp c#页面中嵌入jw flash播放器

试试这样

<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>