Commit eb319507 authored by 李维's avatar 李维

add demo audio to default data

parent 0624b332
...@@ -45,7 +45,7 @@ const defauleFormData = { ...@@ -45,7 +45,7 @@ const defauleFormData = {
}, },
media:{ media:{
image_url:"default-header", image_url:"default-header",
audio_url:"" audio_url:"demo-audio"
} }
} }
] ]
...@@ -480,8 +480,10 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -480,8 +480,10 @@ export class PlayComponent implements OnInit, OnDestroy {
size = "small" size = "small"
} }
this.m_totalQusetion = hotZoneItemArr.length; this.m_totalQusetion = hotZoneItemArr.length;
let randomPos = position[maxNum].slice(0, this.m_totalQusetion)
randomPos = this.randomArray_shuffle(randomPos)
hotZoneItemArr.forEach( (item,index) => { hotZoneItemArr.forEach( (item,index) => {
this.render(this.createPuzzleCard(index, position[maxNum][index].x, position[maxNum][index].y, size, item).ref) this.render(this.createPuzzleCard(index, randomPos[index].x, randomPos[index].y, size, item).ref)
this.addToCardList(`puzzle-card-${index}-container`) this.addToCardList(`puzzle-card-${index}-container`)
}); });
} }
......
...@@ -42,7 +42,8 @@ const localAudios = { ...@@ -42,7 +42,8 @@ const localAudios = {
'sm-choice-timeup-0': 'assets/audio/sm-choice-timeup-0.mp3', 'sm-choice-timeup-0': 'assets/audio/sm-choice-timeup-0.mp3',
'sm-choice-timeup-3': 'assets/audio/sm-choice-timeup-3.mp3', 'sm-choice-timeup-3': 'assets/audio/sm-choice-timeup-3.mp3',
'sm-go': 'assets/audio/sm-go.mp3', 'sm-go': 'assets/audio/sm-go.mp3',
'sm-ready': 'assets/audio/sm-ready.mp3' 'sm-ready': 'assets/audio/sm-ready.mp3',
'demo-audio': 'assets/audio/demo-audio.mp3'
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment