Interface IMediaControl
Assembly: cs.temp.dll.dll
public interface IMediaControl
Methods
Declaration
bool AddChunkToMediaBuffer(byte[] chunk, ulong offset, ulong length)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
chunk |
|
| System.UInt64 |
offset |
|
| System.UInt64 |
length |
|
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
void AudioConfigurationChanged(bool deviceChanged)
Parameters
| Type |
Name |
Description |
| System.Boolean |
deviceChanged |
|
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
Declaration
bool EndOpenMediaFromBuffer()
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
int GetAudioBufferedSampleCount()
Returns
| Type |
Description |
| System.Int32 |
|
Declaration
int GetAudioChannelCount()
Returns
| Type |
Description |
| System.Int32 |
|
Declaration
AudioChannelMaskFlags GetAudioChannelMask()
Returns
Declaration
Returns
| Type |
Description |
| System.Single |
|
Returns a range of time values that contain fully downloaded segments,
which can be seeked to immediately without requiring additional downloading
Declaration
TimeRanges GetBufferedTimes()
Returns
Returns the current video time in seconds
Declaration
Returns
| Type |
Description |
| System.Double |
|
Returns the current video time in frames, range is [0, GetMaxFrameNumber()]
NOTE: For best results the video should be encoded as keyframes only
and have no audio track, or an audio track with the same length as the video track
Declaration
int GetCurrentTimeFrames(float overrideFrameRate = 0F)
Parameters
| Type |
Name |
Description |
| System.Single |
overrideFrameRate |
|
Returns
| Type |
Description |
| System.Int32 |
|
Declaration
Returns
GetLastExtendedErrorCode()
Declaration
long GetLastExtendedErrorCode()
Returns
| Type |
Description |
| System.Int64 |
|
Declaration
Returns
| Type |
Description |
| System.Single |
|
Returns the current video date and time usually from the
EXT-X-PROGRAM-DATE-TIME tag on HLS streams
Only supported on macOS, iOS, tvOS and Android (using ExoPlayer API)
And Windows 10 using WinRT API
Declaration
DateTime GetProgramDateTime()
Returns
| Type |
Description |
| System.DateTime |
|
Returns a range of time values that can be seeked in seconds
Declaration
TimeRanges GetSeekableTimes()
Returns
GetTextureProperties(out FilterMode, out TextureWrapMode, out Int32)
Declaration
void GetTextureProperties(out FilterMode filterMode, out TextureWrapMode wrapMode, out int anisoLevel)
Parameters
| Type |
Name |
Description |
| FilterMode |
filterMode |
|
| TextureWrapMode |
wrapMode |
|
| System.Int32 |
anisoLevel |
|
Declaration
Returns
| Type |
Description |
| System.Single |
|
Copies the specified amount of audio into the buffer
If the specified amount is not yet available then nothing no samples are copied
The number of audio samples grabbed are returned
Declaration
int GrabAudio(float[] buffer, int sampleCount, int channelCount)
Parameters
| Type |
Name |
Description |
| System.Single[] |
buffer |
|
| System.Int32 |
sampleCount |
|
| System.Int32 |
channelCount |
|
Returns
| Type |
Description |
| System.Int32 |
|
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Check to see if external playback is currently active on the player.
Declaration
bool IsExternalPlaybackActive()
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
void MuteAudio(bool bMute)
Parameters
| Type |
Name |
Description |
| System.Boolean |
bMute |
|
Be careful using this method directly. It is best to instead use the OpenMedia() method in the MediaPlayer component as this will set up the events correctly and also perform other checks
customHttpHeaders is in the format "key1:value1\r\nkey2:value2\r\n"=
Declaration
bool OpenMedia(string path, long offset, string customHttpHeaders, MediaHints mediahints, int forceFileFormat = 0, bool startWithHighestBitrate = false)
Parameters
| Type |
Name |
Description |
| System.String |
path |
|
| System.Int64 |
offset |
|
| System.String |
customHttpHeaders |
|
| MediaHints |
mediahints |
|
| System.Int32 |
forceFileFormat |
|
| System.Boolean |
startWithHighestBitrate |
|
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
bool OpenMediaFromBuffer(byte[] buffer)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
buffer |
|
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
Declaration
Declaration
Declaration
void ResetAudioHeadRotation()
Declaration
The time in seconds seeked will be to the exact time
This can take a long time is the keyframes are far apart
Some platforms don't support this and instead seek to the closest keyframe
Declaration
Parameters
| Type |
Name |
Description |
| System.Double |
time |
|
The time in seconds seeked will be to the closest keyframe
Declaration
void SeekFast(double time)
Parameters
| Type |
Name |
Description |
| System.Double |
time |
|
Seek to a specific frame, range is [0, GetMaxFrameNumber()]
NOTE: For best results the video should be encoded as keyframes only
and have no audio track, or an audio track with the same length as the video track
Declaration
void SeekToFrame(int frame, float overrideFrameRate = 0F)
Parameters
| Type |
Name |
Description |
| System.Int32 |
frame |
|
| System.Single |
overrideFrameRate |
|
Seek forwards or backwards relative to the current frame
NOTE: For best results the video should be encoded as keyframes only
and have no audio track, or an audio track with the same length as the video track
Declaration
void SeekToFrameRelative(int frameOffset, float overrideFrameRate = 0F)
Parameters
| Type |
Name |
Description |
| System.Int32 |
frameOffset |
|
| System.Single |
overrideFrameRate |
|
The time in seconds seeked to will be within the range [time-timeDeltaBefore, time+timeDeltaAfter] for efficiency.
Only supported on macOS, iOS and tvOS.
Other platforms will automatically pass through to Seek()
Declaration
void SeekWithTolerance(double time, double timeDeltaBefore, double timeDeltaAfter)
Parameters
| Type |
Name |
Description |
| System.Double |
time |
|
| System.Double |
timeDeltaBefore |
|
| System.Double |
timeDeltaAfter |
|
Set whether the player is allowed to switch to external playback, e.g. AirPlay.
Declaration
void SetAllowsExternalPlayback(bool enable)
Parameters
| Type |
Name |
Description |
| System.Boolean |
enable |
|
Declaration
void SetAudioChannelMode(Audio360ChannelMode channelMode)
Parameters
Declaration
void SetAudioFocusEnabled(bool enabled)
Parameters
| Type |
Name |
Description |
| System.Boolean |
enabled |
|
Declaration
void SetAudioFocusProperties(float offFocusLevel, float widthDegrees)
Parameters
| Type |
Name |
Description |
| System.Single |
offFocusLevel |
|
| System.Single |
widthDegrees |
|
Declaration
void SetAudioFocusRotation(Quaternion q)
Parameters
| Type |
Name |
Description |
| Quaternion |
q |
|
Declaration
void SetAudioHeadRotation(Quaternion q)
Parameters
| Type |
Name |
Description |
| Quaternion |
q |
|
Declaration
void SetBalance(float balance)
Parameters
| Type |
Name |
Description |
| System.Single |
balance |
|
SetExternalPlaybackVideoGravity(ExternalPlaybackVideoGravity)
Sets the video gravity of the player for external playback only.
Declaration
void SetExternalPlaybackVideoGravity(ExternalPlaybackVideoGravity gravity)
Parameters
Declaration
void SetKeyServerAuthToken(string token)
Parameters
| Type |
Name |
Description |
| System.String |
token |
|
Declaration
void SetLooping(bool bLooping)
Parameters
| Type |
Name |
Description |
| System.Boolean |
bLooping |
|
Declaration
void SetOverrideDecryptionKey(byte[] key)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
key |
|
Declaration
void SetPlaybackRate(float rate)
Parameters
| Type |
Name |
Description |
| System.Single |
rate |
|
Declaration
void SetPlayWithoutBuffering(bool playWithoutBuffering)
Parameters
| Type |
Name |
Description |
| System.Boolean |
playWithoutBuffering |
|
SetTextureProperties(FilterMode, TextureWrapMode, Int32)
Declaration
void SetTextureProperties(FilterMode filterMode = null, TextureWrapMode wrapMode = null, int anisoLevel = 1)
Parameters
| Type |
Name |
Description |
| FilterMode |
filterMode |
|
| TextureWrapMode |
wrapMode |
|
| System.Int32 |
anisoLevel |
|
Declaration
void SetVolume(float volume)
Parameters
| Type |
Name |
Description |
| System.Single |
volume |
|
Declaration
bool StartOpenMediaFromBuffer(ulong length)
Parameters
| Type |
Name |
Description |
| System.UInt64 |
length |
|
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
Declaration
bool WaitForNextFrame(Camera dummyCamera, int previousFrameCount)
Parameters
| Type |
Name |
Description |
| Camera |
dummyCamera |
|
| System.Int32 |
previousFrameCount |
|
Returns
| Type |
Description |
| System.Boolean |
|