# Twitch android integration problem

**URL:** <https://staging-discuss.dev.twitch.com/t/twitch-android-integration-problem/10629>\
**Category:** API\
**Created:** [June 7, 2017, 5:37pm UTC](https://staging-discuss.dev.twitch.com/t/twitch-android-integration-problem/10629 "2017-06-07T17:37:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zznhacker](https://avatars.discourse-cdn.com/v4/letter/z/3d9bf3/32.png) [@zznhacker](https://staging-discuss.dev.twitch.com/u/zznhacker)\
**Post date:** [June 7, 2017, 5:37pm UTC](https://staging-discuss.dev.twitch.com/t/twitch-android-integration-problem/10629/1 "2017-06-07T17:37:13Z")

</div>

I am using Webview to load the video. The webview is connect to javascript and html, which is a interactive embed player.

However, I got these error:

Uncaught (in promise) undefined

invalid operation: t.channel is not implemented  
value @ player.42430df….js:8  
[api.twitch.tv/api/viewer/token.json](http://api.twitch.tv/api/viewer/token.json) Failed to load resource: the server responded with a status of 401 ()  
player.42430df….js:8 Invalid operation: t.channel is not implemented  
value @ player.42430df….js:8  
[api.twitch.tv/kraken/user](http://api.twitch.tv/kraken/user) Failed to load resource: the server responded with a status of 401 ()

The error says it’s unauthorized. It’s wired to authorized a embedded video.

My code is like this:

```
var options = {
		width : '100%',
		height : '100%',
	};
    
player = new Twitch.Player("player", options);
player.setVideo(id.toString());

```

Do u guys have any ideas?

---

<div class="post-metadata">

**Author:** ![zznhacker](https://avatars.discourse-cdn.com/v4/letter/z/3d9bf3/32.png) [@zznhacker](https://staging-discuss.dev.twitch.com/u/zznhacker)\
**Post date:** [June 7, 2017, 5:38pm UTC](https://staging-discuss.dev.twitch.com/t/twitch-android-integration-problem/10629/2 "2017-06-07T17:38:49Z")

</div>

Another question, Do we need to do auth for android embedded video?

---

<div class="post-metadata">

**Author:** ![3ventic](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/3ventic/32/298_2.png) [@3ventic](https://staging-discuss.dev.twitch.com/u/3ventic)\
**Post date:** [June 7, 2017, 6:39pm UTC](https://staging-discuss.dev.twitch.com/t/twitch-android-integration-problem/10629/3 "2017-06-07T18:39:23Z")

</div>

Set the video ID in the options, if possible, or on the ready event. Auth is not required; the 401s tell the player it’s not a logged in user so it doesn’t enable additional functionality it has for logged in users.

---

<div class="post-metadata">

**Author:** ![zznhacker](https://avatars.discourse-cdn.com/v4/letter/z/3d9bf3/32.png) [@zznhacker](https://staging-discuss.dev.twitch.com/u/zznhacker)\
**Post date:** [June 7, 2017, 6:46pm UTC](https://staging-discuss.dev.twitch.com/t/twitch-android-integration-problem/10629/4 "2017-06-07T18:46:52Z")

</div>

Thx for your reply!

I try to setVideo when player is ready, and I got the error like this:

readyState: 4, responseText: “{“error”:“Not Found”,“status”:404,“message”:“Video does not exist”}”, responseJSON: Object, status: 404, statusText: “error”

The video id I do here is 149444544, it should absolutely works. Do u have any ideas with this?

Is necessary to convert int to string?

---

<div class="post-metadata">

**Author:** ![3ventic](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/3ventic/32/298_2.png) [@3ventic](https://staging-discuss.dev.twitch.com/u/3ventic)\
**Post date:** [June 7, 2017, 6:51pm UTC](https://staging-discuss.dev.twitch.com/t/twitch-android-integration-problem/10629/5 "2017-06-07T18:51:02Z")

</div>

Video IDs always start with `v` (possibly some starting with `c`), they cannot be integers.

---

<div class="post-metadata">

**Author:** ![zznhacker](https://avatars.discourse-cdn.com/v4/letter/z/3d9bf3/32.png) [@zznhacker](https://staging-discuss.dev.twitch.com/u/zznhacker)\
**Post date:** [June 7, 2017, 7:00pm UTC](https://staging-discuss.dev.twitch.com/t/twitch-android-integration-problem/10629/6 "2017-06-07T19:00:07Z")

</div>

Thx! It works.

---

<div class="post-metadata">

**Author:** ![zznhacker](https://avatars.discourse-cdn.com/v4/letter/z/3d9bf3/32.png) [@zznhacker](https://staging-discuss.dev.twitch.com/u/zznhacker)\
**Post date:** [June 7, 2017, 7:09pm UTC](https://staging-discuss.dev.twitch.com/t/twitch-android-integration-problem/10629/7 "2017-06-07T19:09:17Z")

</div>

However, the video player does not have a control of the progress or volume control in the bottom. Do u know how to show that? I try with option like:

```
var options = {
		width : '100%',
		height : '100%',
		control : true,
		autoplay : true
	};

```

But it doest work.

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [July 7, 2017, 7:17pm UTC](https://staging-discuss.dev.twitch.com/t/twitch-android-integration-problem/10629/8 "2017-07-07T19:17:56Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
