我们的SMAPI实施回放有问题。当尝试播放曲目时,传输会立即返回暂停,就像曲目长达0秒一样。在我们的CDN上使用cURL访问轨道的URI将返回200 OK和正文。
:~$ curl -v -s -o /dev/null https://tracks.cdn.247e.com/thr/assets/mp4-320kbps/00/11/2E/5D56A973F81DF472E050040A2018AE3E.mp4?wxOllzkODJfur46u1oKXw1_cpUJ4534zUZFsSmBkNmQB5P18qAaiXY35793Mct
HEE_e0sTvctyB6sT4JkeA9xI5icthHfKIyZSF2p-tpn_ov8zulVWUVKWa588tHPUNlRVq5lv5uGbyyLdGz9s8-9ckwaWcl-bmEv1Dgsl-WMNYKdytTJGxWYPho-dERduu-uf6hw60kKKI&t=184451257&u=91399964&p=1739&c=247-web&s=PcEscMiBD7kj1_cz4
76yy5eVSA3KSEqfAU70cm43cIo&sid=2946359606&d=2
> GET /thr/assets/mp4-320kbps/00/11/2E/5D56A973F81DF472E050040A2018AE3E.mp4?wxOllzkODJfur46u1oKXw1_cpUJ4534zUZFsSmBkNmQB5P18qAaiXY35793MctHEE_e0sTvctyB6sT4JkeA9xI5icthHfKIyZSF2p-tpn_ov8zulVWUVKWa588tHPUNlRVq5lv5uGbyyLdGz9s8-9ckwaWcl-bmEv1Dgsl-WMNYKdytTJGxWYPho-dERduu-uf6hw60kKKI HTTP/1.1
> Host: tracks.cdn.247e.com
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Cache-Control: s-maxage=172800
< Content-Type: audio/mp4
< Date: Thu, 16 Nov 2017 10:14:54 GMT
< Last-Modified: Mon, 06 Nov 2017 20:43:56 GMT
< Server: ECAcc (lha/8D51)
< X-Cache: HIT
< Content-Length: 12341273
这是/status/opt/log/anacapa.trace日志:
[1970-01-01 11:38:52.440] <chsrc,3> handling req while stopped: 2
[1970-01-01 11:38:52.441] <chsrc,3> recording state as 1 STOPPED (0.000000) w/ itemId = n/a [0]
[1970-01-01 11:38:52.466] <chsrc,3> handling req while stopped: 8
[1970-01-01 11:38:52.467] <chsrc,3> recording state as 1 STOPPED (0.000000) w/ itemId = n/a [0]
[1970-01-01 11:38:52.507] <chsrc,2> starting to execute the queue
[1970-01-01 11:38:52.507] <chsrc,4> resetSegmentFetchErrors
[1970-01-01 11:38:52.507] <chsrc,3> getTrackURIAndFramer() rslt 0x75a6fbc8 [f:0|u:1|m:0((null))] cld:0 [x-sonos-http:ExternalTrack%3a184451257.mp3?sid=255&flags=8224&sn=8]
[1970-01-01 11:38:52.507] <chsrc,4> resetSegmentFetchErrors
[1970-01-01 11:38:52.508] <chsrc,3> Streaming enqueued x-sonos-http:ExternalTrack%3a184451257.mp3?sid=255&flags=8224&sn=8
[1970-01-01 11:38:52.508] <chsrc,2> Start streaming mp3 track (2/2) x-sonos-http:ExternalTrack%3a184451257.mp3?sid=255&flags=8224&sn=8; origin is 41926.927777 (0 samples since)
[1970-01-01 11:38:52.508] <chsrc,3> recording state as 6 TRANSITIONING (-1.000000) w/ itemId = n/a [9]
[1970-01-01 11:38:52.508] <chsrc,2> starting at location 0 s 0 us, offset 0 (00:)
[1970-01-01 11:38:52.508] <chsrc,3> FC: allowing caching
[1970-01-01 11:38:52.989] <sonoscp,3> dereferenced to: https://tracks.cdn.247e.com/thr/assets/mp4-320kbps/00/11/2E/5D56A973F81DF472E050040A2018AE3E.mp4?wxOllzkODJfur46u1oKXw1_cpUJ4534zUZFsSmBkNmQB5P18qAaiXY35793MctHEE_e0sTvctyB6sT4JkeA9xI5icthHfKIyZSF2p-tpn_ov8zulVWUVKWa588tHPUNlRVq5lv5uGbyyLdGz9s8-9ckwaWcl-bmEv1Dgsl-WMNYKdytTJGxWYPho-dERduu-uf6hw60kKKI&t=184451257&u=91399964&p=1739&c=247-web&s=PcEscMiBD7kj1_cz476yy5eVSA3KSEqfAU70cm43cIo&sid=2946359606&d=2
[1970-01-01 11:38:52.989] <chsrc,3> oob metadata cache reset
[1970-01-01 11:38:52.989] <chsrc,3> oob metadata disabled
[1970-01-01 11:38:52.989] <chsrc,2> Downloading https://tracks.cdn.247e.com/thr/assets/mp4-320kbps/00/11/2E/5D56A973F81DF472E050040A2018AE3E.mp4?wxOllzkODJfur46u1oKXw1_cpUJ4534zUZFsSmBkNmQB5P18qAaiXY35793MctHEE_e0sTvctyB6sT4JkeA9xI5icthHfKIyZSF2p-tpn_ov8zulVWUVKWa588tHPUNlRVq5lv5uGbyyLdGz9s8-9ckwaWcl-bmEv1Dgsl-WMNYKdytTJGxWYPho-dERduu-uf6hw60kKKI&t=184451257&u=91399964&p=1739&c=247-web&s=PcEscMiBD7kj1_cz476yy5eVSA3KSEqfAU70cm43cIo&sid=2946359606&d=2
[1970-01-01 11:38:53.692] <chsrc,3> mp3: time to first byte 704
[1970-01-01 11:38:53.693] <chsrc,3> recording state as 5 PLAYING (0.000000) w/ itemId = n/a [9]
[1970-01-01 11:38:53.832] <chsrc,2> Stopped playing x-sonos-http:ExternalTrack%3a184451257.mp3?sid=255&flags=8224&sn=8
[1970-01-01 11:38:53.834] <chsrc,2> running queueCompletionRoutine
[1970-01-01 11:38:54.136] <chsrc,3> recording state as 1 STOPPED (0.000000) w/ itemId = n/a [0]
[1970-01-01 11:38:54.136] <chsrc,2> running stopRoutine
这是请求的getMediaMetadata请求和响应:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<credentials xmlns="http://www.sonos.com/Services/1.1">
<deviceId>94-9F-3E-8A-B8-2A:1</deviceId>
<deviceProvider>Sonos</deviceProvider>
<sessionId>ifEX22xaa8lUFYB0QigH7g</sessionId>
</credentials>
</s:Header>
<s:Body>
<getMediaMetadata xmlns="http://www.sonos.com/Services/1.1">
<id>ExternalTrack:181562676</id>
</getMediaMetadata>
</s:Body>
</s:Envelope>
响应:
<soap:Envelope xmlns="http://www.sonos.com/Services/1.1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getMediaMetadataResponse xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.sonos.com/Services/1.1">
<getMediaMetadataResult>
<id>ExternalTrack:181562676</id>
<itemType>track</itemType>
<title>Havana (feat. Young Thug)</title>
<mimeType>audio/mp3</mimeType>
<trackMetadata>
<albumId>ExternalAlbum:181562675</albumId>
<album>Havana (feat. Young Thug)</album>
<albumArtistId>ExternalArtist:31559059</albumArtistId>
<artist>Camila Cabello</artist>
<albumArtURI>http://artwork.cdn.247e.com/covers/181562675/64x64</albumArtURI>
<canPlay>true</canPlay>
<canSkip>true</canSkip>
<canAddToFavorites>true</canAddToFavorites>
</trackMetadata>
</getMediaMetadataResult>
</getMediaMetadataResponse>
</soap:Body>
</soap:Envelope>