mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Add poster attribute to <video> tag if thumbnail is available
This commit is contained in:
parent
ce2d019aaf
commit
22781e2117
1 changed files with 6 additions and 0 deletions
|
|
@ -191,6 +191,9 @@
|
|||
} else {
|
||||
temp_code += '<video src="' + result.download_url + '" controls data-file-srl="' + result.file_srl + '" />';
|
||||
}
|
||||
if(result.thumbnail_filename) {
|
||||
temp_code = temp_code.replace('controls', 'poster="' + result.thumbnail_filename.replace(/^.\//, XE.URI(default_url).pathname()) + '" controls');
|
||||
}
|
||||
}
|
||||
|
||||
if(temp_code !== '') {
|
||||
|
|
@ -369,6 +372,9 @@
|
|||
} else {
|
||||
temp_code += '<video src="' + result.download_url + '" controls data-file-srl="' + result.file_srl + '" />';
|
||||
}
|
||||
if(result.thumbnail_filename) {
|
||||
temp_code = temp_code.replace('controls', 'poster="' + result.thumbnail_filename.replace(/^.\//, XE.URI(default_url).pathname()) + '" controls');
|
||||
}
|
||||
}
|
||||
|
||||
if(temp_code !== '') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue