Class: Video

Video

サーバーまたはローカルに保存された録画済みビデオファイルを再生する Video オブジェクトです。
ビデオストリームを再生するには、attachNetStream() を使用して、ビデオを Video オブジェクトに関連付けます。
次に、addChild() を使用して、Video オブジェクトを表示リストに追加します。

A Video object that plays a recorded video file stored on a server or locally.
To play a video stream, use attachNetStream() to attach the video to the Video object.
Then, add the Video object to the display list using addChild().

new next2d.media.Video (width, height)

NameTypeDefaultDescription
widthnumber320optional
heightnumber240optional

Extends

  • DisplayObject

Members

next2d.media.Video.namespace staticconstant

指定されたクラスの空間名を返します。
Returns the space name of the specified class.

Default Value:
  • next2d.media.Video

autoPlay boolean

ビデオを自動再生するかどうかを指定します。
Specifies whether or not to auto-play the video.

Default Value:
  • true

bytesLoaded number readonly

既にアプリケーションにロードされているデータのバイト数です。
The number of bytes of data that have been loaded into the application.

Default Value:
  • 0

bytesTotal number readonly

アプリケーションにロードされるファイルの総バイト数。
The total size in bytes of the file being loaded into the application.

Default Value:
  • 0

currentTime number readonly

現在のキーフレーム
Current keyframe

duration number readonly

キーフレーム総数
Total number of keyframes

loop boolean

ビデオをループ生成するかどうかを指定します。
Specifies whether or not to generate a video loop.

Default Value:
  • false

namespace constant

指定されたオブジェクトの空間名を返します。
Returns the space name of the specified object.

Default Value:
  • next2d.media.Video

smoothing boolean

ビデオを拡大 / 縮小する際にスムージング(補間)するかどうかを指定します。
Specifies whether the video should be smoothed (interpolated)
when it is scaled.

Default Value:
  • true

src string

映像コンテンツへの URL を指定します。
Specifies the URL to the video content.

Default Value:
  • ""

videoHeight number readonly

ビデオストリームの高さをピクセル単位で指定する整数です。
An integer specifying the height of the video stream, in pixels.

Default Value:
  • 320

videoWidth number readonly

ビデオストリームの幅をピクセル単位で指定する整数です。
An integer specifying the width of the video stream, in pixels.

Default Value:
  • 240

volume number

ボリュームです。範囲は 0(無音)~ 1(フルボリューム)です。
The volume, ranging from 0 (silent) to 1 (full volume).

Default Value:
  • 1

Methods

next2d.media.Video.toString ()string static

指定されたクラスのストリングを返します。
Returns the string representation of the specified class.

Default Value:
  • [class Video]
Returns:
TypeDescription
string

clear ()void

Video オブジェクトに現在表示されているイメージ(ビデオストリームではない)をクリアします。
Clears the image currently displayed
in the Video object (not the video stream).

Returns:
TypeDescription
void

pause ()void

ビデオストリームの再生を一時停止します。
Pauses playback of a video stream.

Returns:
TypeDescription
void

play ()void

ローカルディレクトリまたは Web サーバーからメディアファイルを再生します。
Plays a media file from a local directory or a web server;

Returns:
TypeDescription
void

seek (offset)void

指定された位置に最も近いキーフレームをシークします。
Seeks the keyframe closest to the specified location.

NameTypeDescription
offsetnumber
Returns:
TypeDescription
void

toString ()string

指定されたオブジェクトのストリングを返します。
Returns the string representation of the specified object.

Default Value:
  • [object Video]
Returns:
TypeDescription
string