Skip to content
Open
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions src/jquery-example/dev-view-play.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,23 @@
<div>
<span id="sdpDataTag"></span>
</div>
<script>
(function () {
const isLocal =
location.hostname === "localhost" ||
location.hostname === "127.0.0.1" ||
location.protocol === "file:";

if (!isLocal) return;

// Hide Composite/Meeting links in local jQuery runs
document
.querySelectorAll('a[href*="dev-composite"], a[href*="dev-meeting"]')
.forEach(link => {
const li = link.closest("li");
if (li) li.style.display = "none";
});
})();
</script>
</body>
</html>
18 changes: 18 additions & 0 deletions src/jquery-example/dev-view-publish.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,5 +234,23 @@
<div>
<span id="sdpDataTag"></span>
</div>
<script>
(function () {
const isLocal =
location.hostname === "localhost" ||
location.hostname === "127.0.0.1" ||
location.protocol === "file:";

if (!isLocal) return;

// Hide Composite/Meeting links in local jQuery runs
document
.querySelectorAll('a[href*="dev-composite"], a[href*="dev-meeting"]')
.forEach(link => {
const li = link.closest("li");
if (li) li.style.display = "none";
});
})();
</script>
</body>
</html>
21 changes: 9 additions & 12 deletions src/react-example/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Nav from './components/shell/Nav';
import Errors from './components/shell/Errors';
import Composite from './components/composite/Composite';
import Play from './components/play/Play';
// import Publish from './components/publish/Publish';
import Publish from './components/publish/Publish';
import Meeting from './components/meeting/Meeting';
import CompositorUserMedia from './components/media/CompositorUserMedia';
import Devices from './components/media/Devices';
Expand All @@ -38,18 +38,15 @@ const App = () => {
<Errors />
</div>
<Switch>
<Route path="/play">
<Play />
</Route>
{ buildComponent === 'develop' && (
{buildComponent === 'develop' && (
<>
<Route path="/meeting">
<Meeting />
</Route>
<Route path="/composite">
<Composite />
</Route>
<Redirect path="/" to="composite" />
<Switch>
<Route exact path="/play" component={Play} />
<Route exact path="/meeting" component={Meeting} />
<Route exact path="/composite" component={Composite} />
<Route exact path="/publish" component={Publish} />
<Redirect exact from="/" to="/publish" />
</Switch>
</>
)}
{ buildComponent === 'composite' && (
Expand Down
41 changes: 29 additions & 12 deletions src/react-example/src/components/shell/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,37 @@ const Nav = (props) => {
<nav className="navbar navbar-expand-sm navbar-light bg-light pb-3 pb-md-2" id="top-nav">
<a className="navbar-brand" href="https://www.wowza.com"><img className="noll" src={wowzaLogo} alt="Wowza Media Systems" /></a>
<ul className="navbar-nav mr-auto-lg">
<li className="nav-item page">
<a href="https://www.wowza.com/developer/webrtc/dev-view-publish">
Publish
</a>
<span></span>
</li>
<li className="nav-item page">
<a href="https://www.wowza.com/developer/webrtc/dev-view-play">
Play
</a>
<span></span>
</li>
{/* These are the navigation items for the hosted version of this project. They link to the jQuery-based Publish and Play pages, which are deployed independently from the React app. */}
{props.buildComponent !== 'develop' && (
<>
<li className="nav-item page">
<a href="https://www.wowza.com/developer/webrtc/dev-view-publish">
Publish
</a>
<span></span>
</li>
<li className="nav-item page">
<a href="https://www.wowza.com/developer/webrtc/dev-view-play">
Play
</a>
<span></span>
</li>
</>
)}
{ props.buildComponent === 'develop' && (
<>
<li className="nav-item page">
<a href="/publish">
Publish
</a>
<span></span>
</li>
<li className="nav-item page">
<a href="/play">
Play
</a>
<span></span>
</li>
<li className="nav-item page">
<Link to="/composite">
Composite
Expand Down