feat: update bunny video support in HC (#13815)

Bunny Video has added a new URL player.mediadelivery.net, this PR adds
support for the new URL
This commit is contained in:
Shivam Mishra
2026-03-16 11:04:27 +05:30
committed by GitHub
parent a90ffe6264
commit 73a90f2841
4 changed files with 22 additions and 5 deletions

View File

@@ -184,12 +184,12 @@ describe CustomMarkdownRenderer do
end
end
context 'when link is a Bunny.net URL' do
context 'when link is a Bunny.net iframe URL' do
let(:bunny_url) { 'https://iframe.mediadelivery.net/play/431789/1f105841-cad9-46fe-a70e-b7623c60797c' }
it 'renders an iframe with Bunny embed code' do
output = render_markdown_link(bunny_url)
expect(output).to include('src="https://iframe.mediadelivery.net/embed/431789/1f105841-cad9-46fe-a70e-b7623c60797c?autoplay=false&loop=false&muted=false&preload=true&responsive=true"')
expect(output).to include('src="https://player.mediadelivery.net/embed/431789/1f105841-cad9-46fe-a70e-b7623c60797c?autoplay=false&loop=false&muted=false&preload=true&responsive=true"')
expect(output).to include('allowfullscreen')
expect(output).to include('allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;"')
end
@@ -200,5 +200,17 @@ describe CustomMarkdownRenderer do
expect(output).to include('position: absolute; top: 0; height: 100%; width: 100%;')
end
end
context 'when link is a Bunny.net player URL' do
let(:bunny_url) { 'https://player.mediadelivery.net/play/431789/1f105841-cad9-46fe-a70e-b7623c60797c' }
it 'renders an iframe with Bunny embed code' do
output = render_markdown_link(bunny_url)
expect(output).to include('embed/431789/1f105841-cad9-46fe-a70e-b7623c60797c')
expect(output).to include('autoplay=false&loop=false&muted=false&preload=true&responsive=true')
expect(output).to include('allowfullscreen')
expect(output).to include('allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;"')
end
end
end
end