Skip to content
This repository was archived by the owner on May 23, 2019. It is now read-only.
This repository was archived by the owner on May 23, 2019. It is now read-only.

How to change to another source #10

@qymspace

Description

@qymspace

I have an array of sources in my state which wish to dynamically assign to react-flow-player depending on user click.
Should doing this work? So that I dynamically change this.state.current to an array containining a new link

<ReactFlowPlayer  
            title={this.state.title}  
            playerId="reactFlowPlayer"  
            playerInitScript="http://releases.flowplayer.org/7.2.1/flowplayer.min.js"  
            live={true}  
            hlsPlugin={true}  
            hlsUrl={  
              'https://releases.flowplayer.org/hlsjs/flowplayer.hlsjs.light.min.js'
            }  
            autoplay={true}  
            className=""  
            onError={(event, config, error) => {  
              console.log(  
                'Player.jsx::error::event',  
                event,  
                'config',  
                config,  
                'error',  
                error  
              );  
            }}  
            onResume={(event, config) => {  
              console.log('Player.jsx::resume::event', event, 'config', config);  
            }}  
            sources={this.state.current}  
          />```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions