Commit 22c82031 authored by JinWei's avatar JinWei

Merge branch 'feature-jj_vedio_practice' into 'master'

更新url后缀

See merge request !5
parents 5ca1d6cc 2aa97a71
...@@ -175,7 +175,6 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O ...@@ -175,7 +175,6 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
console.log('i: ', i); console.log('i: ', i);
this.currentFragmentQues = ques; this.currentFragmentQues = ques;
this.currentFragmentIndex = i; this.currentFragmentIndex = i;
this.fragmentVideoUrl = this.item.video_url || '';
const videoUrl = this.fragmentVideoUrl; const videoUrl = this.fragmentVideoUrl;
this.fragmentVideoCurrentTime = ques.time || 0; this.fragmentVideoCurrentTime = ques.time || 0;
this.fragmentSelectedTime = ques.time || 0; this.fragmentSelectedTime = ques.time || 0;
...@@ -524,7 +523,11 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O ...@@ -524,7 +523,11 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
onVideoIsAccessibleInCDN(url: string) { onVideoIsAccessibleInCDN(url: string) {
console.log('视频已上传到CDN:', url); console.log('视频已上传到CDN:', url);
this.fragmentVideoUrl = url.replace("_h.mp4", ".mp4").replace(".mp4", "_l.mp4"); if (!url.endsWith("_l.mp4")) {
this.fragmentVideoUrl = url.replace("_h.mp4", ".mp4").replace(".mp4", "_l.mp4");
} else {
this.fragmentVideoUrl = url;
}
this.changeDetectorRef.detectChanges(); this.changeDetectorRef.detectChanges();
} }
......
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