Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

RTMPT custom headers

New Here ,
Dec 24, 2013 Dec 24, 2013

Hello!

Please help me with RTMPT. Is there any way I can add custom header for each HTTP request to the server from player?

The point is, I want to forward EVERY HTTP request (POST /fcs/ident2, POST /open/1, POST /idle/session_id/0 and POST /send/session_id/n) from player by Java servlet based on info in these requests. And I can't find a way to put this additional info.

NetConnection.connect("rtmpt://host/servlet", "Custom Info") works but too late because "Custom Info" string is send only on first POST SEND. 

NetConnection.addHeader() does not seem to work cause Wireshark did not show me a new header. Or I used this method wrong.

Thank you

TOPICS
ActionScript
603
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 26, 2013 Dec 26, 2013
LATEST

I've have limited exposure to that but on the Java side are you extracting the header from the AMF format? The docs state it will be retained in every AMF packet sent as a header.

Just some open source server code to examine, note the onConnect method explicitly working with the AMF header data.

https://code.google.com/p/annuus/source/browse/trunk/src/com/ams/rtmp/net/NetConnection.java?r=402

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines