jwplayer xp测试ok chrome可以firfox ie 360不行 貌似不能解码

# -*- coding: utf-8 -*-

import psycopg2

import codecs

from importlib import import_module
import os
from flask import Flask, render_template, Response


# Raspberry Pi camera module (requires picamera package)
# from camera_pi import Camera

app = Flask(__name__, static_folder='', static_url_path='')


@app.route('/', methods=['GET', 'POST'])
def index():
    print "xx"
    print os.path.abspath('.')
    print os.getcwd()
    """Video streaming home page."""
    return render_template('a.html')

@app.route('/<path:filename>', methods=['GET', 'POST'])
def static_handler(path, filename):
    print "name",path, filename
    html=''.join(file(filename).readlines())
    return html

'''
@app.route('/video_x')
def video_x():
    def generate():
        path = 'F:/dao.mp4'
        with open(path, 'rb') as fmp3:
            data = fmp3.read(1024)
            while data:
                yield data
                data = fmp3.read(1024)
    return Response(generate(), mimetype="multipart/x-mixed-replace; boundary=frame")

@app.route('/v/<filename>')
'''
def get_file(filename):
    print filename
    from flask import send_from_directory
    return send_from_directory("f:\\",filename)
if __name__ == '__main__':

app.run(host='')

<html>  
  
<head>  
<script type="text/javascript" src="/static/jwplayer/jwplayer.js"></script>
  
</head>  
  
<body>  
  
<div id="container">Loading the player ...</div>  
<script type="text/javascript">
    jwplayer.key="iP+vLYU9H5KyhZeGt5eVuJJIoULUjltoaMeHXg==";
    jwplayer("container").setup({  
        flashplayer: "/jwplayer/jwplayer.flash.swf",
        file: "/static/video/htpy.mp4",
        image: "/static/test.jpg",
        height: 360,
        width:640,
        stretching : 'fill',
        streamer:"start",
        provider:"http",
        title: 'Beautiful Woman',
       description: 'This is the most beautiful woman in the world, do you agree?'
});  
</script>  
</body>  
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值