@@ -30,13 +30,13 @@ npm i @mux-elements/mux-audio-react
30
30
Then, import the library into your application with either ` import ` or ` require ` :
31
31
32
32
``` js
33
- import " @mux-elements/mux-audio-react" ;
33
+ import ' @mux-elements/mux-audio-react' ;
34
34
```
35
35
36
36
or
37
37
38
38
``` js
39
- require (" @mux-elements/mux-audio-react" );
39
+ require (' @mux-elements/mux-audio-react' );
40
40
```
41
41
42
42
## Features and benefits
@@ -59,12 +59,12 @@ const MuxAudioExample = () => {
59
59
< div>
60
60
< h1> Simple MuxAudio Example< / h1>
61
61
< MuxAudio
62
- style= {{ height: " 100%" , maxWidth: " 100%" }}
62
+ style= {{ height: ' 100%' , maxWidth: ' 100%' }}
63
63
playbackId= " DS00Spx1CV902MCtPj5WknGlR102V5HFkDe"
64
64
metadata= {{
65
- video_id: " audio-id-123456" ,
66
- video_title: " Super Interesting Audio" ,
67
- viewer_user_id: " user-id-bc-789" ,
65
+ video_id: ' audio-id-123456' ,
66
+ video_title: ' Super Interesting Audio' ,
67
+ viewer_user_id: ' user-id-bc-789' ,
68
68
}}
69
69
envKey= " YOUR_MUX_DATA_ENV_KEY"
70
70
streamType= " on-demand"
@@ -101,9 +101,9 @@ If you prefer to use the in-code MSE-based engine (currently hls.js) whenever po
101
101
< MuxAudio
102
102
playback- id= " DS00Spx1CV902MCtPj5WknGlR102V5HFkDe"
103
103
metadata= {{
104
- video_id: " audio-id-123456" ,
105
- video_title: " Super Interesting Audio" ,
106
- viewer_user_id: " user-id-bc-789" ,
104
+ video_id: ' audio-id-123456' ,
105
+ video_title: ' Super Interesting Audio' ,
106
+ viewer_user_id: ' user-id-bc-789' ,
107
107
}}
108
108
envKey= " YOUR_MUX_DATA_ENV_KEY"
109
109
preferMse
@@ -119,9 +119,9 @@ By default `<MuxAudio/>` will try to figure out the type of media you're trying
119
119
< MuxAudio
120
120
src= " https://stream.mux.com/DS00Spx1CV902MCtPj5WknGlR102V5HFkDe/high.mp4"
121
121
metadata= {{
122
- video_id: " audio-id-123456" ,
123
- video_title: " Super Interesting Audio" ,
124
- viewer_user_id: " user-id-bc-789" ,
122
+ video_id: ' audio-id-123456' ,
123
+ video_title: ' Super Interesting Audio' ,
124
+ viewer_user_id: ' user-id-bc-789' ,
125
125
}}
126
126
envKey= " YOUR_MUX_DATA_ENV_KEY"
127
127
controls
@@ -135,9 +135,9 @@ Sometimes, however, your `src` URL may not have an identifiable extension. In th
135
135
src= " https://stream.notmux.com/path/to/an/hls/source/playlist"
136
136
type= " application/vnd.apple.mpegurl"
137
137
metadata= {{
138
- video_id: " video-id-123456" ,
139
- video_title: " Super Interesting Video" ,
140
- viewer_user_id: " user-id-bc-789" ,
138
+ video_id: ' video-id-123456' ,
139
+ video_title: ' Super Interesting Video' ,
140
+ viewer_user_id: ' user-id-bc-789' ,
141
141
}}
142
142
envKey= " YOUR_MUX_DATA_ENV_KEY"
143
143
controls
@@ -151,9 +151,9 @@ Or, for convenience, we also support the shorthand `type="hls`:
151
151
src= " https://stream.notmux.com/path/to/an/hls/source/playlist"
152
152
type= " hls"
153
153
metadata= {{
154
- video_id: " audio-id-123456" ,
155
- video_title: " Super Interesting Audio" ,
156
- viewer_user_id: " user-id-bc-789" ,
154
+ video_id: ' audio-id-123456' ,
155
+ video_title: ' Super Interesting Audio' ,
156
+ viewer_user_id: ' user-id-bc-789' ,
157
157
}}
158
158
envKey= " YOUR_MUX_DATA_ENV_KEY"
159
159
controls
0 commit comments