Reputation: 86
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