Skip to content

mediaDataSource怎么设置呢 不能跨域显示 #5

@TomYule

Description

@TomYule

代码如下 但是好像还是不能跨域显示

    <vue-flv-player :autoplay="true" :controls="true" :muted="true" ref="myPlayer" :type="type" :source="model.url" :mediaDataSource="mediaDataSource"/>

      mediaDataSource: {
        isLive: true,
        cors: true,
        withCredentials: true,
      },

错误信息

Access to fetch at 'http://192.168.94.129:8080/live/[email protected]' from origin 'http://localhost:3080' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.
vue-flv-player.umd.js?d35e:5306          GET http://192.168.94.129:8080/live/[email protected] net::ERR_FAILED 200 (OK)
open @ vue-flv-player.umd.js?d35e:5306
open @ vue-flv-player.umd.js?d35e:6883
_loadSegment @ vue-flv-player.umd.js?d35e:11346
start @ vue-flv-player.umd.js?d35e:11325
open @ vue-flv-player.umd.js?d35e:11952
load @ vue-flv-player.umd.js?d35e:12977
eval @ vue-flv-player.umd.js?d35e:12862
emit @ vue-flv-player.umd.js?d35e:4097
_onSourceOpen @ vue-flv-player.umd.js?d35e:12626
vue-flv-player.umd.js?d35e:4649 [IOController] > Loader error, code = -1, msg = Failed to fetch
e @ vue-flv-player.umd.js?d35e:4649
_onLoaderError @ vue-flv-player.umd.js?d35e:7207
eval @ vue-flv-player.umd.js?d35e:5342
Promise.catch (async)
open @ vue-flv-player.umd.js?d35e:5339
open @ vue-flv-player.umd.js?d35e:6883
_loadSegment @ vue-flv-player.umd.js?d35e:11346
start @ vue-flv-player.umd.js?d35e:11325
open @ vue-flv-player.umd.js?d35e:11952
load @ vue-flv-player.umd.js?d35e:12977
eval @ vue-flv-player.umd.js?d35e:12862
emit @ vue-flv-player.umd.js?d35e:4097
_onSourceOpen @ vue-flv-player.umd.js?d35e:12626
vue-flv-player.umd.js?d35e:4649 [TransmuxingController] > IOException: type = Exception, code = -1, msg = Failed to fetch
e @ vue-flv-player.umd.js?d35e:4649
_onIOException @ vue-flv-player.umd.js?d35e:11560
_onLoaderError @ vue-flv-player.umd.js?d35e:7244
eval @ vue-flv-player.umd.js?d35e:5342
Promise.catch (async)
open @ vue-flv-player.umd.js?d35e:5339
open @ vue-flv-player.umd.js?d35e:6883
_loadSegment @ vue-flv-player.umd.js?d35e:11346
start @ vue-flv-player.umd.js?d35e:11325
open @ vue-flv-player.umd.js?d35e:11952
load @ vue-flv-player.umd.js?d35e:12977
eval @ vue-flv-player.umd.js?d35e:12862
emit @ vue-flv-player.umd.js?d35e:4097
_onSourceOpen @ vue-flv-player.umd.js?d35e:12626
vue-flv-player.umd.js?d35e:4086 Uncaught (in promise) Error: Unhandled error. (undefined)
    at EventEmitter.emit (vue-flv-player.umd.js?d35e:4086:1)
    at EventEmitter.eval (vue-flv-player.umd.js?d35e:12951:1)
    at EventEmitter.emit (vue-flv-player.umd.js?d35e:4097:1)
    at eval (vue-flv-player.umd.js?d35e:12039:1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions