Closed AlexAplin closed 5 years ago
The PUT request is required to keep playlist URLs active, but it doesn't ever seem to change. We need a better solution for streaming to external players rather than work with the assumption that the URLs are constant.
Added basic support in https://github.com/AlexAplin/nndownload/commit/88fe817cd00ea72c61712c969b1d0efa67ff5f95. I'll continue to improve it.
http://site.nicovideo.jp/nicocas/pc/ https://live.nicovideo.jp/recent?tab=nicocas
Nico is experimenting with additional live features. As part of this, the live infrastructure seems to have moved to DMC.
Page URL: https://cas.nicovideo.jp/user/[user_id]/[live_id] API root URL: https://api.cas.nicovideo.jp/v1/services/live/programs/[live_id]
General flow seems to be:
OPTIONS to /watching-qualities
Access-Control-Request-Method: GET
Access-Control-Request-Headers: x-connection-environment,x-frontend-id
Origin: https://cas.nicovideo.jp
GET to /watching-qualities
X-Frontend-Id: 91
X-Connection-Environment: ethernet
OPTIONS to /watching
Access-Control-Request-Method: GET
Access-Control-Request-Headers: content-type,x-connection-environment,x-frontend-id
Origin: https://cas.nicovideo.jp
POST to /watching
Content-Type: application/json
X-Frontend-Id: 91
X-Connection-Environment: ethernet
audienceToken
cookieactionTrackId
: unique identifier, e.g.d558874173_151779710194
. Must be of the form [0-9a-f]{10}_[epoch_value]isBroadcaster
:false
streamCapacity
: highest quality reported by /watching-qualitiesstreamProtocol
:https
streamQuality
:auto
or highest available[data][streamServer][url]
PUT to /watching every 20 seconds