NC 4.2 way of adding custom page

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
I wanted to add a basic Razor page to my NC4.2 site that is, standalone. Basically, I need a popup audio player that opens its own window when a user clicks on it to allow it to play the audio file (voice over) while they visit other pages.
PlayAudio.cshtml
The hyperlink from any page would be www.mywebsite.com/PlayAudio?id=myvoiceover1
and in the page, it would take the id querystring, append .mp3 to the id and use as a source,
then, using an <audio> tag, would start to play once the window opens

The HTML would look something like this:
<html>
<head>
    <title>Voice Over</title>
</head>
<body>
    <div class="vowrap">
        <audio autoplay preload controls>
      <source src="https://www.mywebsite.com/audio/myvoiceover1.ogg" type="audio/ogg"  />
      <source src="https://www.mywebsite.com/audio/myvoiceover1.mp3" type="audio/mpeg"  />
      <source src="https://www.mywebsite.com/audio/myvoiceover1.wav" type="audio/wav"  />
      <source src="https://www.mywebsite.com/audio/myvoiceover1.m4a" type="audio/mp4"  />
    </audio>
  </div>
</body>
</html>



It doesn't require all the overhead, but I'm not really sure if I need to go full blown MVC for something that a simple razor page could handle.  I don't really know where to put the page.

If this isn't possible, what would be a good example of the NC way of doing the MVC?
4 years ago
How the audio popup window is open.

<a class="playstart" onclick="window.open('PlayAudio?id=myvoiceover1', 'Voice Over', 'width=550,height=1,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');return false;" href="#" >CLICK HERE</a>


Note: I already have this on an older website using webforms, just trying to figure out how to get a DotNetCore 2.x Razor Page to run alongside MVC (supposedly, this is possible).
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.