Skip to main content
A newer version of this page is available. .

ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments Class

Contains settings related to the ASPxClientCommandConsts.INSERTYOUTUBEVIDEO_COMMAND command parameter.

Declaration

declare class ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments

Remarks

When the ASPxClientHtmlEditor.ExecuteCommand method is used to execute the ASPxClientCommandConsts.INSERTYOUTUBEVIDEO_COMMAND command manually, it requires an additional parameter of the ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments type.

To create an instance of this class, use the ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments constructor. Specify all required properties of the newly created object and pass the resulting parameter to the ASPxClientHtmlEditor.ExecuteCommand method.


// Inserting a new YouTube video element at the current cursor position
var args = new ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments(htmlEditor);
args.enablePrivacyEnhancedMode = true;
args.showPlayerControls = true;
args.showRelatedVideos = false;
args.showVideoInfo = true;
args.src = "http://www.youtube.com/watch?v=jEddDJyWlBM";
htmlEditor.ExecuteCommand(args.GetCommandName(), args);
See Also