Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #8374 removes global flag in customMediaPlayer patterns #8375

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions source/nodejs/adaptivecards/src/card-elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3057,19 +3057,19 @@ export class Media extends CardElement {
static customMediaPlayers: ICustomMediaPlayer[] = [
{
urlPatterns: [
/^(?:https?:\/\/)?(?:www.)?youtube.com\/watch\?(?=.*v=([\w\d-_]+))(?=(?:.*t=(\d+))?).*/gi,
/^(?:https?:\/\/)?youtu.be\/([\w\d-_]+)(?:\?t=(\d+))?/gi
/^(?:https?:\/\/)?(?:www.)?youtube.com\/watch\?(?=.*v=([\w\d-_]+))(?=(?:.*t=(\d+))?).*/i,
/^(?:https?:\/\/)?youtu.be\/([\w\d-_]+)(?:\?t=(\d+))?/i
],
createMediaPlayer: (matches) =>
new YouTubePlayer(matches, Strings.defaults.youTubeVideoPlayer())
},
{
urlPatterns: [/^(?:https?:\/\/)?vimeo.com\/([\w\d-_]+).*/gi],
urlPatterns: [/^(?:https?:\/\/)?vimeo.com\/([\w\d-_]+).*/i],
createMediaPlayer: (matches) =>
new VimeoPlayer(matches, Strings.defaults.vimeoVideoPlayer())
},
{
urlPatterns: [/^(?:https?:\/\/)?(?:www.)?dailymotion.com\/video\/([\w\d-_]+).*/gi],
urlPatterns: [/^(?:https?:\/\/)?(?:www.)?dailymotion.com\/video\/([\w\d-_]+).*/i],
createMediaPlayer: (matches) =>
new DailymotionPlayer(matches, Strings.defaults.dailymotionVideoPlayer())
}
Expand Down