Copyright © 2005-2023 MultiMedia Soft

CallbackForYoutubeEvents delegate

Previous pageReturn to chapter overviewNext page

Remarks

 

Callback delegate invoked when an event related to a player occurs: this callback can be set through a call to the CallbackForYoutubeEventsSet method.

 

For further details about callback delegates see the How to synchronize the container application with the API tutorial.

 

 

Syntax

 

[Visual Basic]

Public Delegate Sub CallbackForYoutubeEvents (

ByVal nEvent as enumYoutubeEvents,

ByVal nResult as enumErrorCodes,

ByVal nData1 as Int32,

ByVal nData2 as Int32,

ByVal pBufferUnicode as IntPtr,

ByVal nBufferLength as Int32

)


 

[C#]

public delegate void CallbackForYoutubeEvents (

enumYoutubeEvents nEvent,

enumErrorCodes nResult,

Int32 nData1,

Int32 nData2,

IntPtr pBufferUnicode,

Int32 nBufferLength

)


 

[C++]

public delegate void CallbackForYoutubeEvents (

enumYoutubeEvents nEvent,

enumErrorCodes nResult,

Int32 nData1,

Int32 nData2,

IntPtr pBufferUnicode,

Int32 nBufferLength

)


 

 

Parameter

Description

 

 

nEvent

Event reported .

Supported values are the following:

Mnemonic constant

Value

Meaning with data parameters

EV_YOUTUBE_SEARCH_DONE

0

A search on Youtube was completed

 

Involved data parameters:

nData1: Value of type enumYoutubeSearches representing the type of search that was just performed. Supported values are the following:

Mnemonic constant

Value

Meaning with data parameters

YOUTUBE_SEARCH_VIDEOS

0

The search was started by calling the Youtube.VideoListSearch method

YOUTUBE_SEARCH_VIDEO_BY_ID

1

The search was started by calling the Youtube.VideoSearchByID method

YOUTUBE_SEARCH_CHANNELS

2

The search was started by calling the Youtube.ChannelsListSearch method

YOUTUBE_SEARCH_CHANNEL_ITEMS

3

The search was started by calling the Youtube.ChannelVideoListSearch method

nResult

Zero-based index of the player reporting the event

nData1

First 32 bits integer value containing event specific data; its value and meaning depends upon the specific event received: see the table above for possible values.

nData2

Second 32 bits integer value containing event specific data; its value and meaning depends upon the specific event received: see the table above for possible values.

pBufferUnicode

Reserved for future uses

nBufferLength

Reserved for future uses