{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ru/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":"/ru/api-reference/cloud-phone/open-api"},"children":["открытом"]}," и ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ru/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":"/ru/api-reference/cloud-phone/live-streaming","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}