Video src Properti
Contoh
Mengubah URL video:
document.getElementById("myVideo").src = "mov_bbb.ogg";
Definisi dan Penggunaan
Properti src menyetel atau mengembalikan nilai atribut src dari video.
Atribut src menentukan lokasi (URL) file video.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
src | Yes | 9.0 | Yes | Yes | Yes |
Sintaksis
Kembalikan properti src:
videoObject.src
Setel properti src:
videoObject.src = URL
Nilai properti
Value | Description |
---|---|
URL |
Specifies the URL of the video file. Possible values:
|
Detail Teknis
Nilai Kembali: | Sebuah String, mewakili URL dari file video. Mengembalikan seluruh URL, termasuk protokol (seperti http://) |
---|
Lebih Banyak Contoh
Contoh
Dapatkan URL video:
var x = document.getElementById("myVideo").src;
Halaman Terkait
Referensi HTML: HTML <video> atribut src
Objek Video