Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick hack to handle Picarto changes #1332

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Quick hack to handle Picarto changes #1332

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented May 28, 2016

Picarto renamed "placeStreamChannel()" to "placeStreamChannelFlash()" and added a parameter. "placeStreamChannel()" still exists but I didn't see it in use. Looks like they're going to use the original function for the HTML5 stream eventually.

Picarto renamed "placeStreamChannel()" to "placeStreamChannelFlash()" and added a parameter.  "placeStreamChannel()" still exists but I didn't see it in use.  Looks like they're going to use the original function for the HTML5 stream eventually.
@Latent-Logic
Copy link

Confirmation that this change fixes livestreamer for Picarto for me.

@Latent-Logic
Copy link

Latent-Logic commented Jun 22, 2016

Hmm, this fix works for someone streaming alone. But if someone is multi-streaming (multiple streamers shown on the target streamers page at once) on Picarto then the old pattern matching is required.

If someone is streaming alone:

<script>placeStreamChannelFlash\('(?P<channel>[^']+)',[^,]+,[^,]+,'(?P<visibility>[^']+)',[^,]+\);</script>

For example:

<script>placeStreamChannelFlash('channelName','',false,'public',false);</script>

If a multistream is going on:

<script>placeStreamChannel\('(?P<channel>[^']+)',[^,]+,[^,]+,'(?P<visibility>[^']+)'\);</script>

The first streamer (the one for the page we're on, so the one we want to record) has '' in the second parameter:

<script>placeStreamChannel('primaryStreamer','',true,'public');</script>

The other streamers have a number in that parameter showing what number they are:

<script>placeStreamChannel('secondStreamer','2',true,'public');</script>
<script>placeStreamChannel('thirdStreamer','3',true,'public');</script>

A complete fix will need to determine if a page is currently multistreaming and choose the correct regex

@Latent-Logic
Copy link

Crude but works because it goes with the first match, which is the primary streamer. Might want to improve to look at the second parameter.

<script>placeStreamChannel(Flash)?\('(?P<channel>[^']+)',[^,]+,[^,]+,'(?P<visibility>[^']+)'(,[^,]+)?\);</script>

@Latent-Logic
Copy link

The quick hack does have the failure case when someone is still configured to multistream with someone but the primary streamer is no longer streaming. In this case it (incorrectly) says the stream is live and grabs the second stream from the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant