Skip to content

Commit

Permalink
Video: use offline JS files
Browse files Browse the repository at this point in the history
  • Loading branch information
stsrki committed Jan 9, 2025
1 parent d660599 commit 0bbdd8c
Show file tree
Hide file tree
Showing 198 changed files with 4,506 additions and 8 deletions.
4 changes: 3 additions & 1 deletion Documentation/Blazorise.Docs/Models/Snippets.generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11184,7 +11184,9 @@ protected override void OnInitialized()

public const string ImportVideoExample = @"@using Blazorise.Video";

public const string StreamingVideoExample = @"<Video Source=""@(""https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd"")"" StreamingLibrary=""StreamingLibrary.Dash"" />";
public const string VideoDashExample = @"<Video Source=""@(""https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd"")"" StreamingLibrary=""StreamingLibrary.Dash"" />";

public const string VideoHlsExample = @"<Video Source=""@(""https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8"")"" StreamingLibrary=""StreamingLibrary.Hls"" />";

public const string VideoMultipleSourcesExample = @"<Video Source=""@videoSource"" DefaultQuality=""720"" />

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="blazorise-codeblock">
<div class="html"><pre>
<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">Video</span> <span class="htmlAttributeName">Source</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>(&quot;https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8&quot;)</span><span class="quot">&quot;</span> <span class="htmlAttributeName">StreamingLibrary</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="enum">StreamingLibrary</span><span class="enumValue">.Hls</span><span class="quot">&quot;</span> <span class="htmlTagDelimiter">/&gt;</span>
</pre></div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@namespace Blazorise.Docs.Docs.Examples

<Video Source="@("https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8")" StreamingLibrary="StreamingLibrary.Hls" />
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,23 @@
</DocsPageSection>

<DocsPageSection>
<DocsPageSectionHeader Title="Streaming">
We also support streaming videos. To stream the video you just define the <Code>Source</Code> as usual, along with the <Code>StreamingLibrary</Code>
used to handle the video media type.
<DocsPageSectionHeader Title="Streaming Dash">
We also support streaming videos. To stream the video you just define the <Code>Source</Code> as usual, along with the <Code>StreamingLibrary</Code> used to handle the video media type.
</DocsPageSectionHeader>
<DocsPageSectionContent Outlined FullWidth>
<StreamingVideoExample />
<VideoDashExample />
</DocsPageSectionContent>
<DocsPageSectionSource Code="StreamingVideoExample" />
<DocsPageSectionSource Code="VideoDashExample" />
</DocsPageSection>

<DocsPageSection>
<DocsPageSectionHeader Title="Streaming HLS">
We also support streaming of HLS videos. To stream the video you just define the <Code>Source</Code> as usual, along with the <Code>StreamingLibrary</Code> used to handle the video media type.
</DocsPageSectionHeader>
<DocsPageSectionContent Outlined FullWidth>
<VideoHlsExample />
</DocsPageSectionContent>
<DocsPageSectionSource Code="VideoHlsExample" />
</DocsPageSection>

<DocsPageSection>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Source/Extensions/Blazorise.Video/wwwroot/vendors/plyr.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import { P as ParseError, c as ParseErrorCode } from './index.js';

const ParseErrorBuilder = {
r() {
return new ParseError({
code: ParseErrorCode.BadSignature,
reason: "missing WEBVTT file header",
line: 1
});
},
s(startTime, line) {
return new ParseError({
code: ParseErrorCode.BadTimestamp,
reason: `cue start timestamp \`${startTime}\` is invalid on line ${line}`,
line
});
},
t(endTime, line) {
return new ParseError({
code: ParseErrorCode.BadTimestamp,
reason: `cue end timestamp \`${endTime}\` is invalid on line ${line}`,
line
});
},
u(startTime, endTime, line) {
return new ParseError({
code: ParseErrorCode.BadTimestamp,
reason: `cue end timestamp \`${endTime}\` is greater than start \`${startTime}\` on line ${line}`,
line
});
},
y(name, value, line) {
return new ParseError({
code: ParseErrorCode.BadSettingValue,
reason: `invalid value for cue setting \`${name}\` on line ${line} (value: ${value})`,
line
});
},
x(name, value, line) {
return new ParseError({
code: ParseErrorCode.UnknownSetting,
reason: `unknown cue setting \`${name}\` on line ${line} (value: ${value})`,
line
});
},
w(name, value, line) {
return new ParseError({
code: ParseErrorCode.BadSettingValue,
reason: `invalid value for region setting \`${name}\` on line ${line} (value: ${value})`,
line
});
},
v(name, value, line) {
return new ParseError({
code: ParseErrorCode.UnknownSetting,
reason: `unknown region setting \`${name}\` on line ${line} (value: ${value})`,
line
});
},
// SSA-specific errors
T(type, line) {
return new ParseError({
code: ParseErrorCode.BadFormat,
reason: `format missing for \`${type}\` block on line ${line}`,
line
});
}
};

export { ParseErrorBuilder };
Loading

0 comments on commit 0bbdd8c

Please sign in to comment.