Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@pbjlive/live.js
Advanced tools
PBJ Live Javascript SDK (Currently Docs only)
Import javascript file
<script src="https://js.pbj.live/v1/sdk.js"></script>
This script will expose a global Live
class. Initiate the class with your organization api key:
const live = new Live("pk_....")
When the Live
class is initiated you will be able to do several things:
Currently our recommended way to integrate with PBJ Live.
In your html, create a div
tag with your preferred naming, we use live-element
in these examples.
So in your html, add:
<html>
<body>
<!--- Add Live element here ---!>
<div id="live-element"></div>
<script src="https://js.pbj.live/v1/sdk.js"></script>
<script type="text/javascript">
var live = new Live("<Your API Key>");
// Create instance of the iframe embed
var embedPlayer = live.elements.embed()
// Mount the player to the div#live-element in our html
embedPlayer.mount("#live-element")
</script>
</body>
</html>
In the background, this embed()
method will create an iFrame that will injected into your html element, we also offer a lower level solution via the live.elements.video()
method.
const episode = live.elements.video();
Then mount this element to your HTML element:
const videoElement = live.elements.video({
episode: id
});
videoElement.mount("#live-video")
videoElement.start();
videoElement.stop();
videoElement.dispose();
videoElement.volume(0.5)
A number from 0 to 1
videoElement.openFullscreen()
videoElement.closeFullscreen()
live.episodes.schedule()
.then((episodes) => {
const = nextEpisode = episodes[0]
})
live.episodes.list({
show: "..."
})
.then(...)
live.organizations.current()
live.episodes.schedule()
live.episodes.detail({ id })
live.shows.detail()
live.shows.list()
live.organizations.current()
live.users.login()
live.users.register()
live.events.on('episode-status-update', () => ...)
Sockets are added to the Live
instance through the socket
property, subscribing to a specific event can be done by using:
live.sockets.subscribeToEvent(live.sockets.commandTypes.EPISODE_STATUS_UPDATE,(message)=>{
console.log('EPISODE_STATUS_UPDATE', message)
})
The different command types that are available can be found here:
live.sockets.commandTypes
FAQs
PBJ Live Javascript SDK (Currently Docs only)
The npm package @pbjlive/live.js receives a total of 4 weekly downloads. As such, @pbjlive/live.js popularity was classified as not popular.
We found that @pbjlive/live.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.