jwplayer流播放,影藏播放地址

来源:互联网 发布:sql的九个常用语句 编辑:程序博客网 时间:2024/04/30 06:31

jwplayer     'provider':'http', 

js端

 jwplayer('mediaspace').setup({
    'flashplayer': 'xplayer.swf',
    'file': "http://localhost:8080/ws-sample/jws/flv",
    'skin':'skins/xueyun.zip',
    'controlbar': 'bottom',     
    'stretching': 'exactfit',  
    "streamscript":'http://localhost',
    'provider':'http',
    'dock': 'false',
    'width': '470',
    'height': '300'

  });

request.getRequestDispatcher("out.flv?start="+start).forward(request, response);

或者

File f = new File("f:/test/test.flv");
    if(f.exists()){
     response.setHeader("Content-Length", "" + 1024000000);   
     response.setContentType("application/x-shockwave-flash");
     
     FileInputStream is = new FileInputStream(f);
     PrintWriter pw = response.getWriter();
     int k;
     while ((k = is.read()) != -1) {
      pw.write(k);
     }
     pw.flush();
     pw.close();
     is.close();
     is = null;
}

原创粉丝点击