0

我正在使用 Jaris flv 播放器播放 flv 视频。

当我直接打开页面时,它可以打开页面并正常显示(http://mysite.com:8080/TSE/flv/player.jsp)

但是,如果我从 struts 动作的返回重定向并打开页面,它就无法工作(http://mysite.com:8080/TSE/multidocdetailDoc.action?selectId=C94DC060947048B188BB2FAF1804B0F3)

页面显示替代内容(没有 adobe flash 的情况)。

我应该怎么办?

支持 Flash 的内容

可替代的内容

该操作除了重定向之外什么也没做:

public String multidocdetail(){
        try {
            String selectId = getRequest().getParameter("selectId");
            System.out.println(selectId);
        } catch (Exception e) {
            // TODO: handle exception
            e.printStackTrace();
        }
        return "multidocDetail";
    }

支柱:

<action name="*Doc" class="casco.com.tse.action.learn.DocAction" method="{1}">
            <result name="docDetail">/jsp/learn/docDetail.jsp</result>
            <result name="multidocDetail">/flv/player.jsp</result>
        </action>

jsp就像jaris网站的例子:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>Jaris FLV Player</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="language" content="en" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />

    <script type="text/javascript" src="js/swfobject.js"></script>
    <script type="text/javascript">
        var flashvarsVideo = {
            source: "http://localhost:8080/TSE/flv/mv/CTCS-3.flv",
            type: "video",
            streamtype: "file",
            server: "",//Used for rtmp streams
            duration: "52",
            poster: "http://localhost:8080/TSE/flv/poster.png",
            autostart: "false",
            logo: "http://localhost:8080/TSE/flv/logo.jpg",
            logoposition: "top left",
            logoalpha: "30",
            logowidth: "130",
            logolink: "http://jaris.sourceforge.net",
            hardwarescaling: "false",
            darkcolor: "000000",
            brightcolor: "4c4c4c",
            controlcolor: "FFFFFF",
            hovercolor: "67A8C1"
        };
        var params = {
            menu: "false",
            scale: "noScale",
            allowFullscreen: "true",
            allowScriptAccess: "always",
            bgcolor: "#000000",
            quality: "high",
            wmode: "opaque"
        };
        var attributes = {
            id:"JarisFLVPlayer"
        };
        //swfobject.embedSWF("JarisFLVPlayer.swf", "altContentOne", "576px", "360px", "10.0.0", "expressInstall.swf", flashvarsVideo, params, attributes);
        swfobject.embedSWF("JarisFLVPlayer.swf", "altContentOne", "750px", "520px", "10.0.0", "expressInstall.swf", flashvarsVideo, params, attributes);
    </script>
    <style>
        html, body { height:100%; }
        body { margin:0; }
    </style>
</head>
<body>
<br />
    <center>
    <h3>CTCS三级列控体系介绍</h3>
    <div id="altContentOne">
        <h1>Jaris FLV Player</h1>
        <p>Alternative content</p>
        <p><a href="http://www.adobe.com/go/getflashplayer"><img 
            src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" 
            alt="Get Adobe Flash player" /></a></p>
    </div>

    </center>
</body>
</html>
4

0 回答 0