118 Replies
That's an audio playlist file format? Presumably you're actually asking how to plan that audio file in the browser, rather than anything to do with asp.net?
just recently heard from https://github.com/naudio/NAudio
tmk they have mp3 decoding.
but for the playlist format i dont know
GitHub
GitHub - naudio/NAudio: Audio and MIDI library for .NET
Audio and MIDI library for .NET. Contribute to naudio/NAudio development by creating an account on GitHub.
What are you actually trying to do?
no live video format
or video
One of these, right? https://en.wikipedia.org/wiki/M3U
M3U
M3U (MP3 URL or Moving Picture Experts Group Audio Layer 3 Uniform Resource Locator in full) is a computer file format for a multimedia playlist. One common use of the M3U file format is creating a single-entry playlist file pointing to a stream on the Internet. The created file provides easy access to that stream and is often used in downloads...
m3u is playlist
m3u8 is video file
https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8
?
The file you linked is a text file with the following contents:
Wikipedia (which I just linked) says that m3u8 is a UTF-8 encoded m3u file
Stack Overflow
Playing m3u8 Files with HTML Video Tag
I am trying to use HTTP Live Streaming (HLS) to stream video to my computers and my iPhone. After reading through the Apple 'HTTP Live Streaming Overview' as well as 'Best Practices for Creating and
I assume the issue isn't at all about asp.net, but frontend (html)
lets continue here @Hyper
okay
is your database up?
yes
Set up Entity framework to interact with your database
Entity Framework
This article provides an overview of the Entity Framework.
@R
its worked perfectly but
navmenu does not appear and themes disappeared
it's like a completely different page.
?
well its .cshtml,
its seperated from blazor
must be interconnected
how can I both link and use it as a .cshtml file
@page "/" _host.cshtml
i dont think u can, ur gonna have to go back to .razor, but i have no idea why the video player's js isnt running in .net 6.0
navmenu appears
we might need to google how to inject a js script from jsruntime
i disconnected
anyway you said you put
<script src="https://vjs.zencdn.net/8.10.0/video.min.js"></script>
in _host.cshtml and it never worked, right?
for blazor pages (.razor) it works for meyes
i need add <head> or <body> @R
in host.cshtml
do u have any other <script tags in that file?
there are script tags in both the head and body sections
well, i figured a way
try this
do I need to add it to the host.cshtml file again after adding it
remove it from host.cshtml
i noticed the js file has to be injected at a specific time, not in any time
well, i guess i learned something

?
not working :(
is that .razor?
yes
can ui show ur .razor
i honestly need to know how to create a blazor .net 6.0 project
which video player is this?
video.js
clappr?
ah
ah yes im blind, lol
try
if (firstRender == false)
altho that didnt work for me, the opposite does
any errors in ur browser's console window?I'll check now
wait
try removing
await MatchService.LoadMatchSettings();
and use a direct link
i see it now
i see the issue
it loaded the script before await MatchService.LoadMatchSettings();
well, put the <script under
and try again
@Hyper
this works for mewhere is video-min.js
above
else
by 2 linestrying rn

not working
Honestly if that was a bug im glad the blazor team fixed it
ok i found another way
try this
ops forgot to remove <script
@Hyper
this works for me
trying
Can only have one anonymous define call per script file,,
what?
did u remove the <script from _host.cshtml and in .razor?
yes
could be conflicting with the clappr one
i dont have clappr
where do u see this error?
what if I download these imported files myself and add them to the files
console
browser's console or C#'s console?
not browser console
c#
you could, but i dont think it matters
Microsoft.JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.
ok i suspect LoadMatchSettings(); is doing some weird stuff
ur invoking jsruntime methods in that method, right?
what if you put the link directly?
nothing changes

link of ur stream i mean
importing but video not working
.
yeah it needs to be imported after the video player initializes
whats that, i thought we were using OnParametersSetAsync
the page does not open and the error I gave above is written
.
OnAfterRenderAsync gets called before your match loads so it wont work
i wonder why
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await LoadVideoJs();
}
}
private async Task LoadVideoJs()
{
await JsRuntime.InvokeVoidAsync("eval", "var script = document.createElement('script'); script.src = 'https://vjs.zencdn.net/8.10.0/video.min.js'; document.head.appendChild(script);");
}
again dont use OnAfterRenderAsync
wait aminute
not working
shouldnt
be
?
When I converted it to cshtml file, I made onget, I forgot to fix it back
yeah it wont get called u have to change it to that
not working
show ur .razor
in case, try removing the firstTime parts
did you even recompile your project?
no
you should,
this code ?
recpompile
try
if you dont recompile ur project it will always run an older version of ur project
recompiled
starting
not working
i gave you everything that worked for me, i can really suspect it might be the old version of blazor
we always update our projects to a newer version of .net, i dont see why you cant
@R Can I integrate NavMenu.razor file into cshtml file?
You can't, blazor and razor pages cannot be integrated together
razor pages are just html generated by asp
while blazor works differently,
how to update blazor version
im wondering why are u deleting your code
which code
here for example, says original message was deletd
anyway you can go to your project's .csproj
change
<TargetFramework>net6.0</TargetFramework>
to <TargetFramework>net8.0</TargetFramework>
some code might get broken, but it can get fixedif a large part of it broken, not some of it.
i fixed some of my code when i updated to 8.0
it doesn't work, most of them are incompatible.
well, i have something you might try
host.cshtml so navmenu appears in /
invoke this js code by clicking a button in ur blazor page
tried
with this?
are u sure ur blazor page didnt crash?
yes
video is not loading
yes
if you click a button say it pops up a message, does it work?
cshtml

forget cshtml
we r talking about .razor now
the loading icon appears but does not load
no i mean
create a js file in wwwroot folder
put this
import?
then in ur _Host.cstml put this
then in ur .razor
where
<link href="https://vjs.zencdn.net/8.10.0/video-js.css" rel="stylesheet" />
<div>
<video id="my-video"
class="video-js"
controls
preload="auto"
width="1280"
height="720"
poster="valid-poster-url.jpg"
data-setup='{"fluid": true}'>
<source src="@MatchService.MatchSource" type="application/x-mpegURL" />
<p class="vjs-no-js">
JavaScript'i etkinleştirin ve HTML5 video desteği olan bir tarayıcıya geçin.
<a href="https://videojs.com/html5-video-support/" target="_blank">HTML5 video desteği</a>
</p>
</video>
</div>
you never added a button in blazor page before?
not in that sense, how will this button look like, I don't want to add an additional button to start the video
its for testing now
just for tests
the button wont start the video, it will embed the video player
starting
omg
@R finally
i remember i used to do that back in .net 6.0 days
but now i dont need, .net 8.0 fixed alot of stuff
so how do we remove this button and make it automatically imported
cmon u already made it working now ur being greedy, lol
i dont really know, try adding
under </video>
did not work, I wonder if I add my initialisation design with css to the button
it wont ig, old blazor cant run <script tags from here
width="1280"
height="720"
?
what do you think is the best resolution setting
that depends on what you prefer
try this
with
No amount of thanks is enough
tysm
it worked?
yes
perfectly
working
data does not broken even on reboot
i fixed it
sounds like you used database, or set up the value of the property in the code
yes
poster.png
hmm
poster="valid-poster-url.jpg"
so can I integrate clappr with the same management :) @R
sure