mirror of
https://github.com/sifacaii/VlcJellyfin
synced 2025-05-26 06:20:20 -04:00
添加投屏
This commit is contained in:
parent
61a9ab72a0
commit
be207e7352
@ -5,6 +5,7 @@ import android.util.Log;
|
|||||||
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.OkGo;
|
||||||
import com.lzy.okgo.callback.AbsCallback;
|
import com.lzy.okgo.callback.AbsCallback;
|
||||||
import com.lzy.okgo.callback.Callback;
|
import com.lzy.okgo.callback.Callback;
|
||||||
|
import com.lzy.okgo.model.HttpHeaders;
|
||||||
import com.lzy.okgo.model.Response;
|
import com.lzy.okgo.model.Response;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -23,15 +24,17 @@ public class Controller {
|
|||||||
"<CurrentURIMetaData></CurrentURIMetaData>" +
|
"<CurrentURIMetaData></CurrentURIMetaData>" +
|
||||||
"</u:SetAVTransportURI>" +
|
"</u:SetAVTransportURI>" +
|
||||||
"</s:Body></s:Envelope>";
|
"</s:Body></s:Envelope>";
|
||||||
PostXML(controlUrl,xml);
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
headers.put("SOAPAction", "\"urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI\"");
|
||||||
|
PostXML(controlUrl,xml,headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PostXML(String url,String xml){
|
public static void PostXML(String url, String xml, HttpHeaders headers){
|
||||||
|
|
||||||
OkGo.<String>post(url)
|
OkGo.<String>post(url)
|
||||||
.upString(xml)
|
.upString(xml)
|
||||||
.headers("Content-Type","text/xml")
|
.headers(headers)
|
||||||
.headers("charset","utf-8")
|
.headers("Content-Type","text/xml; encoding=\"utf-8\"")
|
||||||
.execute(new AbsCallback<String>() {
|
.execute(new AbsCallback<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Response<String> response) {
|
public void onSuccess(Response<String> response) {
|
||||||
|
Loading…
Reference in New Issue
Block a user