web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

RTSP Streaming in Microsoft Dynamics Nav 2016 using Control add In

(0) ShareShare
ReportReport
Posted on by 5

I am trying to do rtsp streaming in Nav 2016 using control add in using VLC player for dotnet. The control gets added on Nav page but i am not able to stream video from IP camera. The same code works fine on windows application but it does not work in Nav. Here is my sample code.

using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.Dynamics.Framework.UI.Extensibility;
using Microsoft.Dynamics.Framework.UI.Extensibility.WinForms;
using System.Text.RegularExpressions;
using System.IO.Ports;
using WebEye.Controls.WinForms.StreamPlayerControl;
using Vlc.DotNet.Forms;

namespace WeighControl
{
    [ControlAddInExport("CamControl")]
    public class CamControl : WinFormsControlAddInBase
    {
        private VlcControl streamCam1;        
        private delegate void myDelegate(string str);        

        [ApplicationVisible]
        public event MethodInvoker CamControlAddInReady;

        [ApplicationVisible]
        public void ShowCameraControl()
        {
            ShowCamera();
        }

        public CamControl()
        {
            
        }

        private void ShowCamera()
        {
            try
            {
                streamCam1.Play(new Uri("rtsp://admin:admin@192.168.0.171/"));
            }
            catch(Exception ex) 
            {
                
            }

        }

     

        protected override Control CreateControl()
        {
            streamCam1 = new VlcControl();
            this.streamCam1.AutoSize = true;
            this.streamCam1.BackColor = System.Drawing.Color.Black;
            this.streamCam1.Spu = -1;
            this.streamCam1.ForeColor = System.Drawing.Color.Black;
            this.streamCam1.Location = new System.Drawing.Point(1, 416);
            this.streamCam1.Margin = new System.Windows.Forms.Padding(2);
            this.streamCam1.Name = "streamCam1";
            string path = @"C:\Program Files\VideoLAN\VLC";
            System.IO.DirectoryInfo directoryInfo = new System.IO.DirectoryInfo(path);
            this.streamCam1.VlcLibDirectory = directoryInfo;
            this.streamCam1.VlcMediaplayerOptions = null;
            this.streamCam1.Size = new System.Drawing.Size(540, 226);
            this.streamCam1.TabIndex = 2198;

            streamCam1.HandleCreated += (sender, args) =>
            {
                if (CamControlAddInReady != null)
                {
                    CamControlAddInReady();
                }
            };
            return streamCam1;
        }
       
    }
}
I have the same question (0)
  • Suggested answer
    Andy Sather Profile Picture
    on at

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    I will open this up to the community in case they have something to add.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans