Are you willing to clarify about "pass it each frame of the video."
Your question is puzzling since at first glance you're doing the right thing in the 2nd half of your code. Yet, the first half of your code is nonsense.
The classification should be done similarly to the 2nd half. Something similar to:
trafficVid = VideoReader('C:\Users\syafiqah\Desktop\project\traffic.mp4');
for k = 1:trafficVid.NumberOfFrames
label = classify(net, imresize(trafficis.readFrame, net.Layers(1).Inputsize));