I can't find any documentation with yt api to fire an event whenever a new user subscribes, but I wonder how people on live streams add new subscriber info on their videos whenever someone subscribes.
I'm trying to get the same youtube subscriber notification like people do when they are in livestreams.
But I can't find any way to do it.
I thought of setting interval of checking channel, like if the sub count increases, check the latest subscriber from subscription list.
But this is kinda complicated and can't handle multiple users when they subscribe.
So my question is how does the youtuber's subscriber notification works and how can I replicate it in a nodejs project for example:
async function newSub(sub){ myWeb.send(user.name+ " Thank you for subscribing"); }
Related
I have a scenario wherein I would need to mute some of the remote participants in the video call in my local machine. Example of this use case is when I want to be able to just hear a remote participant that is presenting and no else.
Solution I found online is to muted as stated here: https://github.com/twilio/twilio-video.js/issues/363.
Muting the html element appears to work but I'm just curious if there is a Twilio method that can achieve the same result?
At this time, the SDK does not provide a native ability to mute remote tracks. Only the local participant can disable their own tracks.
A solution to this problem is the track subscription API. This API allows you to make a request to update a certain participant's subscribe rules so you can programmatically unsubscribe users from tracks. For your use case, you can could hit this API to unsubscribe participants from specific users in the room, or unsubscribe all participants from all tracks except the presenter.
More info on this can be found here: https://www.twilio.com/docs/video/api/track-subscriptions
Let me know what you think!
first of all im using youtube api to create my app. im in progress to creating an app to get every comment from my youtube channel and reply to it. it's mainly used for customer relationship activity. right now im using a script which call youtube api to pull its data (all comments from my channel) every 30 seconds. but it takes a lot of time and burdens my server. its not quota friendly too.
so here are my questions
is there no webhook or something on youtube so i can get a notification / event every time there's comment on my channel and reply to it. something similar to facebook webhook.
I'm trying to use the YouTube API to get my discord bot to send me a message when I post a new video, but since I'm a beginner I do not know how to do this. The idea is that it looks like this: http://prntscr.com/j8je80 , the embed is ready but the api part of youtube is still missing.
You needed to subscribe to push notification.
The YouTube Data API (v3) supports push notifications via
PubSubHubbub, a server-to-server publish/subscribe protocol for
Web-accessible resources. Notifications are pushed out to subscribers
via HTTP webhooks, which is much more efficient than polling-based
solutions. With PubSubHubbub, your server finds out about events in
near real-time, without having to determine the optimal polling
interval or repeatedly fetching data that hasn’t changed.
So these are the following activities that will trigger the push notification:
uploads a video
updates a video's title
updates a video's description
To be able to implement these, there is a step by step explanation on how to subscribe.
According to google support:
Use Messages to send private messages to other members of the YouTube
community. [...] The messages system utilizes Google+
messaging so your channel must be connected with a Google+ in order to
use this feature.
https://support.google.com/youtube/answer/57955?hl=en
Is it possible to send direct messages to followers via youtube or google plus API?
I think the closest thing that's currently implemented is the Subscriptions resource, which
"contains information about a YouTube user subscription. A
subscription notifies a user when new videos are added to a channel or
when another user takes one of several actions on YouTube, such as
uploading a video, rating a video, or commenting on a video." [source]
So your subscribers should be getting a notification when you upload a video or do something similar anyways. If you wanted to message each of them directly, I suppose you could use Subscriptions.list() with mySubscribers to get your list of subscribers, but I don't think there's a way to mass message them programmatically (seems like it could be easily abused).
Is it possible using the current APIs to track where one's subscribers are subscribing from?
For example perhaps I want to see how many subscribers an annotation on a certain video (that any user uploaded) generated for my channel.
The closest thing to what you're describing is running a YouTube Analytics API report with
ids=channel==UC...
dimensions=video
metrics=subscribersGained,subscribersLost
sort=-subscribersGained
This will return the top ten videos that led to subscriptions to your channel. But I don't think that videos uploaded in third-party channels that have annotations prompting people to subscribe to your channel will show up on that list. My understanding is that only videos in your own channel will show up on the list, and it might be that only subscriptions made via the Subscribe link on the web page (not via an annotation) would trigger inclusion on that report.
Sorry that I don't have more specific details.