Alica Corwin
Alica Corwin

Reputation: 86

Unable to use Clappr RTMP package in React [missing es6 syntax]

i want to utilize the clappr rtmp package to play rtmp streams. My tech stack includes React and in one of my component i intend to use this package but the syntax of clappr-rtmp seems outdated.

I have tried changing the syntax to ES2015 but I remained unsuccessful.

Current there are 2 files. Index.JS and Main.JS. The main file includes all of the code logic whereas in Index file we are exporting the default.

export default require('./src/main.js') //Index.JS File (main entry point)

export default class RTMP extends Flash { //RTMP class which will be used in react component)
}

I receive an error "Uncaught SyntaxError: Unexpected token export" on export default require('./src/main.js').

Upvotes: 1

Views: 179

Answers (0)

Related Questions