@@ -43,7 +43,7 @@ export class App extends Component {
4343 }
4444
4545 UNSAFE_componentWillMount ( ) {
46- this . addMessage ( 6 )
46+ this . addMessage ( 7 )
4747 }
4848
4949 getRandomColor ( ) {
@@ -56,7 +56,7 @@ export class App extends Component {
5656 }
5757
5858 token ( ) {
59- return ( parseInt ( Math . random ( ) * 10 % 7 ) ) ;
59+ return ( parseInt ( Math . random ( ) * 10 % 8 ) ) ;
6060 }
6161
6262 photo ( size ) {
@@ -97,6 +97,9 @@ export class App extends Component {
9797 mtype = 'video' ;
9898 status = 'sent' ;
9999 break ;
100+ case 7 :
101+ mtype = 'audio' ;
102+ break ;
100103 default :
101104 mtype = 'text' ;
102105 status = 'read' ;
@@ -119,7 +122,7 @@ export class App extends Component {
119122 date : + new Date ( ) ,
120123 collapseTitle : loremIpsum ( { count : 2 , units : 'words' } ) ,
121124 participants : Array ( this . token ( ) + 6 ) . fill ( 1 ) . map ( x => ( {
122- id : parseInt ( Math . random ( ) * 10 % 6 ) ,
125+ id : parseInt ( Math . random ( ) * 10 % 7 ) ,
123126 title : loremIpsum ( { count : 1 , units : 'words' } ) ,
124127 } ) ) ,
125128 dataSource : Array ( this . token ( ) + 5 ) . fill ( 1 ) . map ( x => ( {
@@ -153,6 +156,7 @@ export class App extends Component {
153156 text : mtype === 'spotify' ? 'spotify:track:0QjjaCaXE45mvhCnV3C0TA' : loremIpsum ( { count : 1 , units : 'sentences' } ) ,
154157 data : {
155158 videoURL : this . token ( ) >= 1 ? 'https://www.w3schools.com/html/mov_bbb.mp4' : 'http://www.exit109.com/~dnn/clips/RW20seconds_1.mp4' ,
159+ audioURL : 'https://www.w3schools.com/html/horse.mp3' ,
156160 uri : `data:image/png;base64,${ this . photo ( 150 ) } ` ,
157161 status : {
158162 click : true ,
0 commit comments