Streaming through Janus with Vue.js

I successfully ran Janus on a server with no issues, but I'm currently facing some challenges in figuring out how to stream on the Janus server. Despite my searches, I have not been able to locate any code snippets. I am working on a project using Vue.js and was wondering if there is a library available for streaming over Janus. Any help or sample code would be greatly appreciated.

Answer №1

Janus Gateway offers a streaming plugin that allows you to transfer video data using software like gstreamer or ffmpeg.

If you're interested in setting this up on a Raspberry Pi, you can follow the steps outlined in the Q&A at this link:

Here is a brief summary of how to configure the Janus gateway streaming plugin:

Set up Janus gateway streaming plugin

To set up the streaming plugin, locate the configuration file

/opt/janus/etc/janus/janus.plugin.streaming.jcfg
. You can refer to the official documentation for more details.

You'll find sample configurations in the file, such as rtp-sample which receives VP8/Opus streaming data via RTP. To stream H.264 video, you need to modify the configuration with specific settings.

h264-sample: {
        type = "rtp"
        id = 10
        description = "H.264 live stream"
        audio = false
        video = true
        videoport = 8004
        videopt = 126
        videortpmap = "H264/90000"
        videofmtp = "profile-level-id=42e01f;packetization-mode=1"
        secret = "somesecretid"
}

After updating the configuration, remember to restart Janus gateway.

Start video streaming

You can use tools like FFMpeg to send video data to the Janus streaming plugin through RTP. The provided command example showcases how to do this.

Note that the video parameters and the output RTP port number should match the Janus streaming plugin's configuration.

Prepare Vue.js frontend

In the next step, create a web frontend to view the streaming content using the bundled janus.js module in Janus gateway. Refer to the official documentation for information on utilizing janus.js within your Vue.js project.

A sample Vue.js project and webpack configuration are provided for reference, allowing you to import the Janus object and handle streaming video data through APIs.

For further assistance, you can explore an example Vue.js project.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

If the <span> element contains text, then apply a class to the <i> element

Is there a way to target a different i element with the id 'partnered' and add the class 'checkmark'? $(document).ready(function () { jQuery('span:contains("true")').addClass('checkmark'); }); The current code su ...

React frontend unable to retrieve JSON data from Rails API

I have developed a backend Rails API and confirmed that the endpoint is being accessed by monitoring my server in the terminal. Additionally, I am able to view the response in Postman. However, I am facing an issue where the payload is not returned in my R ...

Checking for the Existence of a Database Table in HTML5 Local Storage

Upon each visit to my page, I automatically generate a few local database tables if they do not already exist. Subsequently, I retrieve records from the Actual Database and insert them into these newly created local tables. I am wondering if there is a me ...

What is the best method for directing a search URL with an embedded query string?

Currently, I am developing an express application that has two different GET URLs. The first URL retrieves all resources from the database but is protected by authentication and requires admin access. The second URL fetches resources based on a search para ...

Prevent the submission of the form if the textfield does not contain any

Is there a way to prevent form submission when a textfield is empty? Currently, my script allows for new empty records to be inserted into the database even when the textfield is empty. $(document).ready(function(){ $("#form1").on('submit', ...

React error: You have attempted an invalid hook call. Hooks are only allowed to be called within the body of a function component. What could be causing this issue with my syntax

In setting up a Login Form Page function, my goal is to determine whether the user is already logged in. If they are logged in, a button should be displayed prompting them to log out. The code snippet I am using for this functionality is: {user ? userLogge ...

jQuery and handling multiple forms - the first form steals the show!

I encountered an issue on my page where I have several form elements and jQuery code to execute when a form is clicked. Here is the structure of the form: <form method="post" action=""> {% csrf_token %} <input id="vote" name="vote" type="hidden" ...

Unique rewritten text: "Special case: This is not defined

I am in the process of creating my own custom exception in Node.js to handle errors specific to the environment the server is running in. However, when the error is thrown, it shows as undefined. (function () { 'use strict'; var states = req ...

Errors are not displayed or validated when a FormControl is disabled in Angular 4

My FormControl is connected to an input element. <input matInput [formControl]="nameControl"> This setup looks like the following during initialization: this.nameControl = new FormControl({value: initValue, disabled: true}, [Validators.required, U ...

My build process with gulp is not generating the expected output file. What could have gone awry?

Can anyone help me figure out why my gulp task is not generating any files? Below is the code for my task: import gulp from 'gulp'; import babelify from 'babelify'; import sourcemaps from 'gulp-sourcemaps'; import browserify ...

Managing conflicting eslint rules within the AirBNB configuration can be challenging, but here are some best

Hey all, I'm new to Vue and I'm attempting to create a POC. I've set up ESLint with the AirBNB configuration, but I've run into an issue. Here is the section of code where I'm encountering problems within my Axios call: .catch((er ...

Unlocking the power of accessing nested data in JSON files dynamically

Building a new feature that allows users to input a word, choose the language, and receive the definition along with an example using the API service. To retrieve the desired data at position 0 of "exclamation" in the "meaning" section. This ensures that ...

casperjs is encountering difficulty locating the id even after setting it

Issue with CasperJS not locating the ID after setting it Casper.then(function () { screenLog(); var id = String("_newid_"); var arrow = this.evaluate(function () { var arrows = document.querySelectorAll('span.select2-selection__a ...

"Help! My JSON parser is incorrectly parsing my JSON data – what

I am currently developing an application using node.js for the server-side and angular for the frontend. I have encountered a problem with a basic post method where my JSON data is being interpreted as a key on the server. Could this be related to my use o ...

trigger an event once an element has completed cycling using cycle.js

Incorporating the cycle.js library for simple transitions between images: $(document).ready(function() { var first; var $slider = $(".trauringe"); $slider.cycle({ timeout: 8000, next: '#next', prev: '#prev' ...

Is it acceptable to include numerous embedded documents when designing a MongoDB database?

Currently, I am in the process of creating a MongoDB database for a basic voting system. If I were to outline a schema, it would look something like this: User { name: String , email: String } Vote { message: String , voters: [ObjectId(User._ ...

Is there a way to stop the navbar from covering the title?

Looking for help with customizing my navbar. At the moment, it resembles image one but I'm aiming for the appearance of image two. Any suggestions on how to achieve this? Is it a CSS modification that needs to be made? /* Nav Bar*/ .navbar-brand{ ...

Determining when a text area has selected text without constant checking

class MarkdownEditor extends React.Component { constructor(props) { super(props); this.timer = null; this.startIndex = null; this.endIndex = null; } componentDidMount() { this.timer = setInterval(() => { this.setSelectio ...

Can you explain how this particular web service uses JSON to display slide images?

{ "gallery_images": [ {"img":"http://www.jcwholesale.co.uk/slider_img/big/1_1433518577.jpg"}, {"img":"http://www.jcwholesale.co.uk/slider_img/big/1_1433519494.jpg"}, {"img":"http://www.jcwholesale.co.uk/slider_img ...

Error: Unable to access unknown properties (reading 'extend')

Struggling to integrate the Vuetify library into my current Vue 3 project, encountering complications. An error message popped up post-compilation: vuetify.js?ce5b:42021 Uncaught TypeError: Cannot read properties of undefined (reading 'extend') ...