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 StreamerFAQHLSDVRRTMPnimble streamerhlsABRcachewmsauthNimbleAPItranscoderffmpegdvrapiVODfailoverrtmpstreamingDASHwmspanelvodudprtsppaywallsubtitlesDispersaRTSPyoutubelivelivestreamingmp4MPEG-DASHWMSAuthpay-per-viewgeosldpdashvideostreameredgeabrWindowsencryptionhttpsUDPwhite labelconfigsmiluser agentFFMPEGmulticastSRTsslaudioMPEG-TSre-streamingmpeg-dashchunksraspberry piCORSandroidsrtbandwidthadvertizercorsvlcS3WMSPanelDRMrules.confadvertisingipv6MPEGTSFastSpringRAMwms panelthumbnailFMLEVATcrossdomainupdateRecordingmpegtsplaylistSMILwowzaakamaiaespushserversm3u8TranscodeSSLerrorbalanceplaylist_dvrWowzachromecastconfigurationIDreportingbugdomainnimblestreamerperformanceIPloopHttpsVidillionchunkmobilerepublishingawsAWSdownloadorigincloudfrontpublish controlcodecmpeg-tsCDNraspiannimble webcam html5UIroutesbitrateRegistration Issuedirect link32-bit Windowstwitchanalysecache_controlitworkmelive abr support mpeg-dashwmspanelapirtmp abrbeirutWWDCdubaideep statshls to multicast udplogcloudIIS Smooth StreamingmediaHot-linking protectionHTTPSAbrHDSvaddioalertsAuthentication in HLSCentOS v6.4jwplayer websitepricebaselinewhmcslimitOld logsscreencastnginx rtmp nimbleAV BridgeVaddioattaching domainsPI3 Ubuntuview timeWMSCONFIG_HOMEmessagerestreamcostinterfacesDVRRecordingloadbalancingmod_rewritemetadataprofilehls restreamingID3 tagsgbpsAxisVLCwmsauthsignhighhds streamresumeniblerlocalciscodecodertransocding republishingVideo Player.net hotlinkAliaslost trafficgentoo install server nimblePublic Iptranscoding using NvidiaPaywall AuthlocationlebanonmanifestofflinedocumentationipMP4 not playedspaceTrancoderconcurrent-connectionsicecast urlfileruleseekinghot linkingchangeamfServer-sideplayoutPlayReadyamazon web servicelimuxtasks-controldvr stream twicestoppedmainhot-linkAXVVGondata slicesaliasblocknvencconnectivitydvr streamunique visitorHLS vodpay per viewpaywalapplicationanalytics7brandingtrialMP4microsoft streamdvr_archivesmpeg dasherrorsobsTCOlog traffic statsrocksoftopenssldebianExpression Encoderprogressive downloadABR DASHlive video on demandFFmpegmultiple originsnimblesessionidbandwithHLS PlayerheaderDASH Playerserverlog nimble analysertmp playbackvideojssourceSnapshotsadaptiveAV1 codecNGINX-RTMPJWPLAYERPullvideo stopprivate networkLarge DVR filescrossdomain more then 1 domain4Kno WMSPanelsoundHLS Meta Tag editing.streamslive videoattachmentmac osx installvod no soundconcurrent connectionwotermarkhelp errorvimeoAWS 3buttload balanceFairplayfallbackamazonControl APIRemote StorageWowza AgentLive streamingTranscodervsomcdnnot foundsecuritylive streampullAS3Widevinempeg2tsServer-Side-Task-Controltwitch larix broadcaster androidDVRSettingsinstall players setup ready to goDelete recordsAppledisk migrationicecastscreen capturestereo to monodrmvideo loopresourceaes encryptionsubscriptionstarttime duration seekpointrebootmonitordvr streamsABR HLS Bitrateslive pull settingsnimble.confrtmp republishing transcodeIIS Media Servicsautomationnimble streamer web server php script pageNimble Streamer APIlivestreamrtmp for YouTubeapi accessDeep statsinterleavingweb playerABR DVR problemNimble CapacityoutrateLive Switcherscreen freezecan't registercontent-dispositionactionscript 3Live Broadcastnot to stealnimble streamer vod hls transmuxinglogginglearnerCross DomainNimble Serverinsert logoRTMP republishPIDAVCaptureMovieFileOutputblock downloadbroadcasterOSXPost processingadd_chunk failedfake extensionMPEG DASHUbuntu artful 17.10Transcoder MPEG DASHtranscodingFFMPEG;RTMP;I/O errorstatus:errornimble on cloudprerollHotlinking ProtectionStreaming routepremium featureThumbnailsserver incorrect timelarix broadcasterMPEG-DashLiveLIVEHow to do live stream with multiple audio trackpaymentProgressivenimble aliasesstatsrmtpno internetreloadSecuredemandreportsraspberryavoid refreshAndroiduser_agentdvr on wmspanelVideo cant be playedS3 AWSBroadcastLarixprogressivelivestream bitratecredentialsHLS Streamingthumbnail dvr-thumbnailLoad-Balancingnimble streamer mpeg-ts multiple inputswmsAuthSignPORTDVR Settingvbv-maxratetranscodeRepublishinglatencyadjustdelaympeg4buildPacketizingABR bitratestranscoder nimbleubuntu 18Teradek DecoderSLDPVR-360Failoverabr fallbackNimble connections.movalias routestoragedistributionspeedup my videoiOSgoogle cloud storagepricingissuecpucloudflareUsers limitoutputVOD HLS streaming on public IPdomain lockcontentRTMP RepublishCSSanalisyssctevideo.jsitworkscdnqatartransocderlivestreaminrtsp push androidartifactscache expiryvideo streamingQuickTimepublish streamtraffichd25AArch64incoming streamno soundInvalid frame headerstorage space availabledisk3.6.1-1mp2 audiofastspringwebhookdvr to livedissapointmentpay-per-minuteSO_RCVBUFbuffering videoadvp9nimble dvrdurationBandwidthgpuav1 codecNimbleStreamerPaywallvideo and audio not matchDVRStreamsaws amazonrulesError when installingFallbackhelprestartIOSViewer StatsNDIDVR Setting limitssaibufferGopHTML5 playerMPEG2 Videologo in streamUDP MulticastMax connectiona recordwirecasthttp serverSSL requestserver ip21

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.