Skip to content

getHLSStreamingSessionURL is returning null #3002

@ap-northeast-0

Description

@ap-northeast-0

Describe the issue

I am unable to retrieve a streaming session using getHLSStreamingSessionURL. Below is my code and whether I set an existing or non-existing streamName, getHLSStreamingSessionURL returns null.

I have written my code under the steps to reproduce

On the side note, I know I have set my AWS systems credentials correctly because when I tried the code below, I was able to get the data end point.
KinesisVideoClient kvsClient = KinesisVideoClient.create(); GetDataEndpointRequest requestEndPoint = GetDataEndpointRequest.builder().streamName(streamName).build(); GetDataEndpointResponse responseEndPoint = kvsClient.getDataEndpoint(requestEndPoint); System.out.println(responseEndPoint.dataEndpoint());

Hope you guys can help me.

Steps to Reproduce

public class KVSService {
    public KinesisVideoArchivedMediaClient getClient() {
        return KinesisVideoArchivedMediaClient.create();
    }
    
    public String test() {
    	KinesisVideoArchivedMediaClient kvs = getClient();
    	String url = null;
    	
    	try {
    		GetHlsStreamingSessionUrlRequest request = GetHlsStreamingSessionUrlRequest.builder()
        			.streamName(streamName)
                    .expires(1000)
        			.playbackMode(HLSPlaybackMode.LIVE)
        			.containerFormat(ContainerFormat.FRAGMENTED_MP4)
        			.discontinuityMode(HLSDiscontinuityMode.ALWAYS)
        			.displayFragmentTimestamp(HLSDisplayFragmentTimestamp.NEVER)
        			.build();
    		GetHlsStreamingSessionUrlResponse response = kvs.getHLSStreamingSessionURL(request);

        	System.out.println(response.sdkHttpResponse().statusCode()); // this always returns 200 even if streamname is not blank
        	System.out.println(response.hlsStreamingSessionURL()); // this is returning null

        	url = response.hlsStreamingSessionURL();
    	} catch (KinesisVideoArchivedMediaException e) {
    		e.printStackTrace();
    	}
    	
    	return url;
    }
}

Current behavior

getHLSStreamingSessionURL always returns null

AWS Java SDK version used

2.17.121

JDK version used

15.0.1 2020-10-20

Operating System and version

mac os 10

Metadata

Metadata

Assignees

Labels

closed-for-stalenessguidanceQuestion that needs advice or information.response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions