GithubHelp home page GithubHelp logo

Comments (7)

AimLuo avatar AimLuo commented on May 27, 2024

好像是视频问题,

from reactjs-player.

xiaosongxiaosong avatar xiaosongxiaosong commented on May 27, 2024

我的 demo 里面 flv.js 都是给的直播参数,没有测试过 flv.js 播回放的情况,如果有测试地址我这边可以把 demo 增加一个播录像的选项,同理 hls.js 都是用来播回放的

from reactjs-player.

xiaosongxiaosong avatar xiaosongxiaosong commented on May 27, 2024

这个 url 是 http 的,demo 地址是 https 的,所以会没办法播放 @AimLuo

from reactjs-player.

AimLuo avatar AimLuo commented on May 27, 2024

看到了,而且还有跨域问题。

from reactjs-player.

AimLuo avatar AimLuo commented on May 27, 2024

flv.js有跨域限制。😭

import React from 'react';
import ReactPlayer from 'reactjs-player';
import './App.css';
export default () => {
  return <ReactPlayer kernel="flvjs" src="http://47.110.238.135:8018/mailian/07466BFE7481_1.flv" type="video/x-flv" />
}

image

from reactjs-player.

AimLuo avatar AimLuo commented on May 27, 2024

跨域用nginx代理应该可行,不过我们项目的流有问题,

  • 有待验证

image

from reactjs-player.

xiaosongxiaosong avatar xiaosongxiaosong commented on May 27, 2024

@AimLuo

  1. 可以先用 flv.js 测试下,我这边对于视频没有做过多的处理,可能参数调一下就能适配,flv 格式标准就不是那么严格
  2. 跨域的问题可以再后端配置一下下面两个响应头:
access-control-allow-headers: *
access-control-allow-origin: *

from reactjs-player.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.