openYoutube

fun Context.openYoutube(videoId: String = String.empty(), channelId: String = String.empty())

Context Extension to open the YouTube video or channel, if you have the application installed it will open the video or channel in the application, in case you do not have it installed it will open a Chrome Tab with the function openInCustomTab

It is important to know that if one of the two parameters is not passed, the function will not perform any action

Parameters

videoId

String the video to be displayed for default is empty String

channelId

String the channel to be displayed for default is empty String