From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../api/htmlmediaelement/playing_event/index.html | 129 +++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 files/ja/web/api/htmlmediaelement/playing_event/index.html (limited to 'files/ja/web/api/htmlmediaelement/playing_event') diff --git a/files/ja/web/api/htmlmediaelement/playing_event/index.html b/files/ja/web/api/htmlmediaelement/playing_event/index.html new file mode 100644 index 0000000000..6008cd8af0 --- /dev/null +++ b/files/ja/web/api/htmlmediaelement/playing_event/index.html @@ -0,0 +1,129 @@ +--- +title: 'HTMLMediaElement: playing イベント' +slug: Web/API/HTMLMediaElement/playing_event +tags: + - API + - Event + - HTMLMediaElement + - Reference + - Web + - events + - playing + - イベント +translation_of: Web/API/HTMLMediaElement/playing_event +--- +
{{APIRef("HTMLMediaElement")}}
+ +

playing イベントは、データ不足のために一時停止または遅延した後に、再開する準備ができたときに発生します。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
バブリングなし
キャンセル不可
インターフェイス{{DOMxRef("Event")}}
対象Element
既定のアクションなし
イベントハンドラープロパティ{{domxref("GlobalEventHandlers.onplaying")}}
仕様書HTML5 media
+ +

+ +

これらの例は、 HTMLMediaElement の playing イベントにイベントリスナーを追加してから、イベントが発生したことでイベントハンドラーが動作したときにメッセージをポストします。

+ +

addEventListener() を使用した例:

+ +
const video = document.querySelector('video');
+
+video.addEventListener('playing', (event) => {
+  console.log('Video is no longer paused');
+});
+ +

onplaying イベントハンドラープロパティを使用した例:

+ +
const video = document.querySelector('video');
+
+video.onplaying = (event) => {
+  console.log('Video is no longer paused.');
+};
+ +

仕様書

+ + + + + + + + + + + + + + + + + + +
仕様書状態
{{SpecName('HTML WHATWG', "media.html#event-media-playing", "playing media event")}}{{Spec2('HTML WHATWG')}}
{{SpecName('HTML5 W3C', "embedded-content-0.html#event-media-playing", "playing media event")}}{{Spec2('HTML5 W3C')}}
+ +

ブラウザーの対応

+ + + +

{{Compat("api.HTMLMediaElement.playing_event")}}

+ + + + + +

関連情報

+ + -- cgit v1.2.3-54-g00ecf