{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/uk/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Пряма трансляція Cloud Phone"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"пряма-трансляція-cloud-phone","__idx":0},"children":["Пряма трансляція Cloud Phone"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Відкритий або локальний API дозволяє завантажити один MP4-файл, почати трансляцію, перевірити статус і завершити її."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"передумови","__idx":1},"children":["Передумови"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Використовуйте модель WUIN або Xiaosuan; інші постачальники зараз повертають ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33401"]},". Увімкніть Cloud Phone і отримайте OAuth2-токен із правом керування."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Файл має бути у форматі MP4 і завантажуватися з ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uploadType=2"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"процес-для-відкритого-api","__idx":2},"children":["Процес для відкритого API"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Викличте ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/uploadUrl"]}," і завантажте MP4 у ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["presignedUrl"]}," через HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Викличте ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/uploadFile"]}," з ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uploadType: 2"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Перевіряйте ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/uploadFileResult"]},". Якщо ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}," дорівнює ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},", продовжуйте опитування; зупиніться, коли ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.status"]}," стане ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," (успіх) або ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}," (помилка)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Передайте точне значення рядка ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.fileId"]}," як ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["int64"]}," у ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/live/start"]},". У JavaScript використовуйте серіалізацію довільної точності й не перетворюйте значення через ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Number"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Використовуйте ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/cloudphone/live/status"]}," для перевірки та ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/cloudphone/live/end"]}," для завершення."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Для локального API використовуйте ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/cloudphone/upload/file/signedUrl"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/cloudphone/upload/file"]}," з ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uploadType: 2"]}," і ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/cloudphone/upload/file/result"]},", потім ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/cloudphone/live/start"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/status"]}," або ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/end"]},". Баланс і квоти доступні через ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/balance"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Повні схеми наведено у ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/uk/api-reference/cloud-phone/open-api"},"children":["відкритому"]}," та ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/uk/api-reference/cloud-phone/local-api"},"children":["локальному API Cloud Phone"]},". У разі тайм-ауту спочатку перевірте статус. Помилки трансляції: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33300"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33301"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33401"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33418"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["99002"]},"; API завантаження повертає ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33419"]}," для файлів не у форматі MP4."]}]},"headings":[{"value":"Пряма трансляція Cloud Phone","id":"пряма-трансляція-cloud-phone","depth":1},{"value":"Передумови","id":"передумови","depth":2},{"value":"Процес для відкритого API","id":"процес-для-відкритого-api","depth":2}],"frontmatter":{"seo":{"title":"Пряма трансляція Cloud Phone"}},"lastModified":"2026-08-28T16:11:38.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/uk/api-reference/cloud-phone/live-streaming","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}