Forum

API on_publish and on_disconnect event?

Paul 2020-03-30 15:20:40 UTC in WMSPanel functionality

Sorry if it is in the API documentation but I cannot find it.

is there any way to do something (run a script) when a viewer connects and disconnects / time out?

Thank you

Sergei 2020-03-31 01:37:40 UTC 

Hello, Paul.

If you mean tracking specified client connection/disconnection there are no WMSPanel API methods to trigger a script by these events.

Thank you.

Sergei 2020-03-31 02:46:44 UTC 

Paul, you may achieve the desired result using the external handler as described in the following documentation page:
https://blog.wmspanel.com/2018/11/playback-session-authorization.html
Feel free to use the following sample code as a starting point:
https://github.com/WMSPanel/playback-authorization/blob/master/playback_authorization_handler.py

Paul 2020-03-31 20:25:08 UTC 

Thanks.

I need to make it so client can only watch 1 channel at a time.

playback authorization would work but I am no good at socket programming.

I have just seen the PPV handler page. softvelumDOTcom/paywall/pay_per_view/
Could I accomplish what I want with using "Enable publish/unpublish notifications."

Thank you

Alex Pokotilo 2020-04-01 01:31:28 UTC 

1)"Enable publish/unpublish notifications" is triggered when incoming stream connected/disconnected. it's not for client connection notifications.
2) you don't have to be socket programmer to implement https://blog.wmspanel.com/2018/11/playback-session-authorization.html . handler implemented as regular web handler on any modern language. github link provided has simple python example
3) If you plan to use pay_per_view you will have to implement web handler as well. Usually clients implement both https://blog.wmspanel.com/2018/11/playback-session-authorization.html and pay per view handler.
Auth handler declines client if this user already watch video. pay per view handler checks when client disconnected and mark client disconnected from current stream to allow connect to new one.
You can mark client as "watching" in your database and don't show video player in case if client is "watching".

Paul 2020-04-03 08:26:40 UTC 

Thanks a lot for the info

Post a reply


Post a new question

Categories:

Tags:

nimbleNimble StreamerFAQHLSDVRRTMPhlsnimble streamerABRcachewmsauthNimbleAPIapitranscoderSRTdvrrtmpffmpegVODsrtfailoverDASHsldpstreamingrtspwmspanellivevodudppaywallsubtitlesDispersaRTSPvideoSLDPyoutubeabrlivestreamingmp4WMSAuthMPEG-DASHpay-per-viewgeodashstreamerWMSPaneledgebandwidthWindowsencryptionthumbnailUDPhttpswhite labelconfigsmilmulticastFFMPEGsslMPEG-TSaudioCORSchunksraspberry pire-streamingmpeg-dashperformancecorsadvertizervlcrepublishingS3cloudfrontDRMuser agentandroidNDILarixrules.confplaylistadvertisingipv6MPEGTSFastSpringRAMFMLEVATcrossdomainmpegtsSMILRecordingaespushakamaiwowzaserversPullcodecmobileerrorSSLTranscodem3u8balancechromecastplaylist_dvrWowzaIDreportingconfigurationdownloadbugpublish controlRepublishingnimblestreamerdomainLarix Broadcastermpeg-tsraspianloopVidillionHttpschunkAWSawsoriginCDNwms panelroutesamazonIPscte35ipupdateUInimble webcam html5bitrateRegistration Issuedirect link32-bit Windowstwitchcache_controlitworkmelive abr support mpeg-dashwmspanelapiresumertmp abrbeirutWWDCdubaiCentOS v6.4hls to multicast udpnooblogRemote StorageWowza AgentIIS Smooth StreamingcloudmediaAbrHTTPSHot-linking protectionHDSvaddioalertsjwplayer websitebaselinetimelinewhmcsnginx rtmp nimbleAuthentication in HLSAV BridgePi4VaddiopricePI3 UbuntulimitOld logsscte-35screencastview timeinterfacesattaching domainsDVRRecordingcontainerloadbalancingmod_rewritemetadataprofileID3 tagsgbpsAxisdatmessageWMSCONFIG_HOMEwmsauthsignhighhds streamrestreamcostlocalcisco.net hotlinkhls restreaminggentoo install server nimbleVLCPublic Iptranscoding using NvidiaPaywall AuthniblerofflinedocumentationNimble streamer upgradeconcurrent-connectionsTrancoderdecodertransocding republishingVideo PlayerfileAliaslost trafficServer-sideexportopensslstoppedNimble Streamer versionmainicecast urlrulehot linkingchangelebanonlocationmanifestrtmp for YouTubeMP4 not playedspaceLarix Groveamfseekingpay per viewonSteam stopped workingnginxPlayReadyamazon web servicelimuxdvr_archivesmpeg dashobsTCORaspian BusterHLS voddvr stream twicedeep statssdpshoutcasthot-linkAXVVGanalyticspaywalapplicationblocknvencExpression Encoder7brandingtrialdebianmicrosoft streamMP4HLS PlayererrorsDASH Playerrocksoftlog traffic statslive video on demandbandwithservernimblesessionidFFmpegmultiple originsprogressive downloadABR DASHscreen freezecan't registersourceheaderprivate networkLarge DVR filesSnapshotslog nimble analysertmp playbackno WMSPanelvideojslive videointerleavingvideo stopmac osx installadaptiveAV1 codecwotermarkstreamsNGINX-RTMPJWPLAYERvimeohelp errorattachmentload balancevod no soundconcurrent connectioncache expirydvr streamconnectivityUbuntu 20 ARM - AWSunique visitor4Kcrossdomain more then 1 domaincdnvsomlive streamcpuViewer StatsWidevineFairplayAWS 3buttDelaympeg2tsServer-Side-Task-Controlnot foundCPU Loaddisk migrationpullAS3screen capturestereo to monoTranscoderLive streamingdrmsecurityresourceaes encryptioninstall players setup ready to goDVRSettingstwitch larix broadcaster androidAppleDelete recordssubscriptionABR HLS Bitrateslive pull settingsWMSPanel settingsvideo loopicecaststarttime duration seekpointrebootudp streamingoutratemonitornimble streamer vod hls transmuxingloggingapi accessDeep statsloadbalancernimble.confrtmp republishing transcodeIIS Media Servicslearnerweb playerdvr streamsinsert logoautomationnimble streamer web server php script pageNimble Streamer APIlivestreamcontent-dispositionNimble CapacityABR DVR problemAVCaptureMovieFileOutputblock downloadLive SwitcherNimble ServerPost processingadd_chunk failedfake extensionMPEG DASHUbuntu artful 17.10Transcoder MPEG DASHnot to stealLive BroadcastRTMP republishstatus:errorFFMPEG;RTMP;I/O errortranscodingPIDHotlinking ProtectionStreaming routefacebookMPEG-Dashlarix broadcasterbroadcasterOSXadvp9snapshotpaymentstatspremium featureserver incorrect timeThumbnailsreloadLiveLIVEcontentRTMP RepublishssaiDVR Setting limitdemandHow to do live stream with multiple audio trackrmtpno internetIOSProgressivenimble aliasesHLS Streamingthumbnail dvr-thumbnailLoad-Balancingnimble streamer mpeg-ts multiple inputswmsAuthSignreportsavoid refreshraspberrysoundHLS Meta Tag editing.transcoder nimbleSecureJetson Nanotranscodevbv-maxratedvr on wmspanelVideo cant be playedS3 AWSuser_agentautomateAndroidVR-360Failoverdockerlivestream bitrateABR bitratesPacketizingbuildpublish streamStream Delaytraffichd25AArch64delaympeg4.movalias routestoragedomain lockVOD HLS streaming on public IPoutputUsers limitcloudflareanalisysscteno soundInvalid frame headerincoming streamHTML5 playerGopwirecasta recordhttp serverNimbleStreamerav1 codecabr fallbackNimble connectionsdistributionfastspringNimble streamermp2 audiodata slicesaliasplayer sldpqataritworkscdnvideo.jsspeedup my videoiOSissuepricinggoogle cloud storagedissapointmentpay-per-minuteRAM LoadlivestreamintransocderPaywallvideo and audio not matchdiskstorage space available3.6.1-1SO_RCVBUFbuffering videocompatibility protocolsMax connectionUDP MulticastgpurestarthelpFallbackError when installinghow-tomanage_dvrrulesDVRStreamsaws amazonserver ip21SSL requestMPEG2 Videologo in streamVP9sha265nimble on cloudprerollDVR SettingPORTanalyseStreamIDcredentialsincomingmulti-viewervideo audioCross DomainSRT protocolmd5nimble dvrrtpdurationBandwidthbufferRIST BondingplayoutControl APIfallbackQuickTimevideo streamingartifactsrtsp push androidtuningactionscript 3server ssl errorCSSRistwebhookdvr to liveprogressivebroadcast videoRTMP to SRTubuntu 18Teradek DecoderlatencyNimble_Crushdynamic linksTLSV 1.2 Certificatefairplayre-publishingSRT RTMPsoftware versionadjustBroadcasthotlink protectionultra low latencyRaspberryPi4Raspberrytasks-control

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the Privacy Policy. If you want to know more or withdraw your consent to all or some of the cookies, please refer to the Privacy Policy.
By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to the use of cookies.