All the pitfalls I met in the first month

Pitfalls I met.

The first pitfall is regarding the environment. I have vagrant box (Homestead) installed on my Mac. However, the box crashes every one hour. I have no idea what went wrong. It is perhaps the God likes me that I fixed this environment issue the next day. I update my Mac to the newest version which solved this problem..  - -'

I need an extra scope (channel_read) in order to view users stream key. Here is where things get tricky. Our website solely relies on third-party login. When user logins from Twitch again we lost the `view stream key` permission from the user.

Here is what we did to solve this problem. Firstly, I successfully convinced my team that we need to add `channel_read` scope in the config file so that we will always have this channel_read permission. However, things go south. Because this is an extra scope, every user of our website needs to re-login and re-auth in order to give us the permission. Our users pissed off, so we reverted this change in order to show how we care about our user.

Since this change has been reverted. Each time user logins, we lost the permission to view user's stream key. Thus, when the user is loading multistream page I will have to check whether we have the correct permission. If not, I will pop up a callout saying: "we don't have the permission to get your stream key, please click HERE to give us the permission".

For this one, we need to get $broadcastsResponse->items[0]->contentDetails->boundStreamId first. And then use boundStreamId to get streamName inside ingestionInfo. We also need to consider the edge case that users live channel is not set up yet.

For this one, - -'. We got the correct permissions we need by adding channel:streamKey:self in the config file. However, the stream key mixer returns is not really the stream key we find in mixer's admin panel. The real stream key is userid concatenate streamkey with a hyphen in the middle. - -'

Based on my knowledge, the maximum length of a live video in Facebook is 5 hours. What if the streamer wants to stay live for 6 hours. This is an issue that needs to be solved. I don't know how I come across the policy of Facebook. But thanks to the policy(19.1 I don't need to get the stream key from Facebook. This is because the policy says "Don’t build apps that enable publishers to simultaneously stream to Facebook and other online streaming services."

Something wired about getting stream key from Youtube.
I cannot get $broadcastsResponse->items[0]->`contentDetails` for M's account.  May be relogin to Youtube(Youtube updates M's info. ) solves this problem.
Anyway, I will throw an Exception when I cannot get `contentDetails`
``` throw new Exception('You might need to relogin to Youtube');```

One last issue
One needs to link youtube(third-party) account with our website so that I can get his stream key. When the youtube account is not linked, I need to redirect the user to account settings page to get it linked. But when a user finished linking the account, he will stay on account settings page. He will not be redirected back to multistream page.

Based on above, we need to make a streamlined user experience. When user clicks add youtube channel, I need to merge youtube account to our website's account first and add channel afterward. I have to do it for three platforms which we currently support.


  1. If you 1xbet are be} new to the game, positive you|ensure you|be positive to} search for the European version first and start training your skills on it first. 3d Casino roulette wheel with chips, poker cards and dice. Mobile telephone, roulette with on line casino chips, slot machine and cards. The labour dispute centred on the distribution of 2.6 billion pesetas that on line casino workers accrued yearly in suggestions, that on line casino house owners wished to realize a larger share of. Because of this impasse, it's surmised that the Garcia-Pelayo have been allowed to benefit of|benefit from|reap the advantages of} casinos slightly more simply than would have otherwise been the case.


Post a Comment

Popular posts from this blog

How to scale a website-My Approach